Whitespace Remover & Normalizer
Remove, trim and collapse spaces, tabs and blank lines safely
About the Whitespace Remover & Normalizer
Clean pasted text without guessing: remove spaces, tabs, line breaks or blank lines, trim each line or the whole text, and collapse repeated spaces. Special characters such as no-break spaces, other Unicode spaces and zero-width spaces have their own explicit settings, and everything runs in your browser.
How to use
- 1.Paste text, open a text file or load an example.
- 2.Turn on the rules you need; the output updates as you type.
- 3.Open Special spaces to convert or remove no-break, Unicode and zero-width spaces.
- 4.Turn on Show whitespace to see what remains.
- 5.Copy the output or download it as a .txt file.
Rule order
Rules always run in the same order: special spaces, remove all whitespace, tabs, spaces, trim each line, blank lines, line breaks, repeated spaces, collapse all and trim entire text. Remove all whitespace overrides the other rules. Windows (CRLF) and classic Mac (CR) line endings are kept as they are unless you remove or replace line breaks.
Emoji, joiners and code
Zero-width joiners, non-joiners and variation selectors are never removed, so emoji sequences and complex scripts are not broken. This is a text tool, not a minifier: removing all whitespace from JSON or code also changes whitespace inside strings, so use the JSON Formatter, CSS Minifier or JS Minifier for code.
Limits
Input is limited to 2,000,000 characters. Characters are counted as Unicode code points. Unicode line and paragraph separators (U+2028, U+2029) are not treated as line breaks. Whitespace markers are shown for outputs up to 200,000 characters.
