Text Cleaner: Remove Extra Spaces, Tabs and Blank Lines
Six whitespace options, applied in a fixed order when you click Clean Text. All are on by default except joining lines. The counter under the result shows how many characters were removed.
Cleaning Options
Runs in your browser: your files and text are not uploaded. Free, no account needed.
Last updated: · Reviewed by the QuickTooly Team
Text Cleaner Guide
The six operations, in the order they run
- Normalize line endings: Windows CRLF (
\r\n) and old Mac CR (\r) become LF (\n). - Replace tabs: each tab becomes a single space. Columns aligned with tabs will not stay aligned.
- Trim lines: removes whitespace at the start and end of every line, including non-breaking spaces there.
- Collapse spaces: two or more ordinary spaces become one. Non-breaking spaces inside a line are not touched.
- Remove empty lines: deletes lines that are completely empty. With Trim off, a line holding only spaces is not empty and stays.
- Join lines: replaces every line break with a space, turning the text into one paragraph.
Option combinations to watch
- Tabs are replaced before spaces are collapsed, so
a+ two tabs +bends asa bwhen both are on. - Join lines with Remove empty lines off turns each blank line into a double space, because collapsing has already run.
- Join lines with Normalize off leaves
\rcharacters in the joined text, since only\nis replaced. - Words hyphenated at line ends, common in text copied from PDFs, are not re-joined:
exam-andpleon two lines becomeexam- ple. Remove-\nwith Find and Replace in regex mode before joining. - The cleaner only handles whitespace. It does not strip HTML tags or special characters.
Text cleaner questions
Does the cleaner remove non-breaking spaces?
Only at the start or end of a line, when Trim is on. Collapse merges ordinary spaces only, so a non-breaking space between two words stays. Find and Replace in regex mode with the pattern \u00A0 can replace them.
Can I keep paragraph breaks but remove extra blank lines?
Not with these options: Remove empty lines deletes every blank line, including single paragraph breaks. Turn it off and use Find and Replace in regex mode to replace \n{3,} with a double line break instead.
What does the counter show when the result is empty?
If the input held only whitespace, the cleaned result is empty. After then reads 0 and Removed equals the input length.
Related text tools
- Find and Replace: regex patterns for cases the cleaner skips, such as non-breaking spaces or hyphenated line ends.
- Remove Duplicate Lines: after cleaning, lines that differed only in spacing compare as equal.
- Word Counter: count words and characters in the cleaned text.