Normalize whitespace
Fix messy spacing in one step: single spaces between words, no spaces at the start or end of lines, and never more than one blank line in a row.
How it works
-
Paste your text
Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.
-
Instant result
The result appears as you type. Change the options and see straight away what changes.
-
Copy or download
Copy the result with one click, save it as a file or use it as input for a next step.
What it does
With Keep lines and paragraphs ticked (the default):
- runs of spaces, tabs and hard spaces become one space;
- spaces at the start and end of each line are removed;
- three or more line breaks in a row become a single blank line;
- the whole text is trimmed.
Untick it and the entire text is flattened onto one line with single spaces, which is handy for joining text copied from a PDF or e-mail.
Related
For a narrower clean-up, see remove double spaces and remove empty lines. To fix curly quotes and invisible characters too, use normalize text.
Frequently asked questions
Is the normalize whitespace free?
Yes. The normalize whitespace is completely free, with no account, sign-up or usage limit.
Is my text stored?
No. Your text is processed in your browser and is not sent to a server or stored.
Is there a maximum length?
No, there is no fixed limit. Very long texts can just be a little slower.