Skip to content
kitto works
All tools

Remove Line Breaks & Spaces — Clean Up Text Formatting

Remove or replace line breaks, strip tabs and half/full-width spaces, trim each line, and collapse repeated blank lines — all at once. Everything runs in your browser, and your text is never sent anywhere.

Your text is processed entirely in your browser and is never sent anywhere.

Formatting options

Result

How to use

  1. Paste or type your text into the box above.
  2. Check the options you need under "Formatting options" — remove line breaks, tabs, spaces, trim lines, or collapse blank lines.
  3. The "Result" box updates instantly. Use "Copy result" to paste it wherever you need it.

How it works

Order of operations

When several options are selected together, they're applied in this order:

  1. Line-ending normalization (Windows \r\n and old Mac \r are converted to \n). This always happens automatically and is not optional.
  2. Remove tabs
  3. Remove spaces (half-width only, full-width only, or both)
  4. Trim leading/trailing whitespace on each line
  5. Collapse repeated blank lines into one
  6. Remove line breaks (joining with nothing, or with a space)

Line breaks are removed last so that per-line cleanup (tabs, spaces, trimming, blank-line collapsing) happens first, and the overall line structure is only folded down at the very end.

What counts as a "space"

"Half-width only" targets the ASCII space (U+0020); "full-width only" targets the full-width (ideographic) space (U+3000). Line breaks and tabs are not affected by this option — remove them separately.

How collapsing blank lines works

A line is treated as "blank" if it's empty, or contains only spaces/tabs. When two or more blank lines appear in a row, only the first one is kept and the rest are removed. A single blank line on its own (not adjacent to another blank line) is left untouched.

About the line-break replacement option

"Join with nothing" removes line breaks and joins lines directly, which can merge words together. If that's not what you want, choose "Join with a space" instead. Combined with blank lines in your text, this option can produce runs of multiple spaces in the result.

FAQ

Is my text sent anywhere?

No. All processing happens entirely inside your browser, and nothing is transmitted to a server. Once the page has loaded, it keeps working even offline.

Removing line breaks merges my words together. How do I avoid that?

Under "Remove line breaks", choose "Join with a space" instead of "Join with nothing". A space is inserted where each line break used to be, so words no longer run together.

Can I remove only full-width spaces and keep half-width ones?

Yes. Check "Remove spaces" and then choose "Full-width only" from the options that appear. Choose "Half-width only" to do the opposite.

Does it handle Windows-style line endings (CRLF) correctly?

Yes. Any line-ending style in your input (CRLF or a lone CR) is normalized to LF (`\n`) before anything else happens, so text created on Windows, Mac or Linux all produces the same result.

Can I collapse several blank lines in a row into just one?

Yes — check "Collapse repeated blank lines". Any run of two or more blank lines (empty, or containing only spaces/tabs) is reduced to a single blank line.