Whitespace Remover
Remove extra spaces, trim lines, delete all whitespace, join lines or remove blank lines in one click. Shows the cleaned text instantly, nothing uploaded.
Runs entirely in your browser. Your data is never uploaded.
What is Whitespace Remover?
Cleans up spacing in text with one of six focused operations: collapse repeated spaces and tabs, trim each line, remove all whitespace, remove line breaks, remove blank lines, or convert tabs to spaces.
How to use Whitespace Remover
- Paste your text into the Input box.
- Choose an operation in What to remove.
- Copy the cleaned text from Output.
Example
a b c d
a b c d
Collapse repeated spaces and tabs
When to use Whitespace Remover
Use it to tidy text pasted from PDFs, e-mails or web pages, or to prepare strings for code and data. For several clean-ups at once (plus invisible characters, quotes, emoji), use the Text Cleaner.
How Whitespace Remover works
Collapse replaces every run of spaces and tabs inside a line with a single space and trims each line, but keeps line breaks. Trim removes leading and trailing whitespace from every line and from the whole text. Remove all whitespace deletes every Unicode whitespace character including line breaks and non-breaking spaces. Remove line breaks joins all lines with single spaces (removing indentation around the breaks). Remove blank lines drops lines that are empty or contain only whitespace. Tabs to spaces replaces each tab with four spaces.
Common Use Cases
- Joining lines of text copied from a PDF into one paragraph
- Removing double spaces from a document
- Deleting all spaces from a code, IBAN or serial number
- Removing blank lines from a list
- Converting tab indentation to spaces
FAQs
Does collapsing spaces remove line breaks?
No. Only spaces and tabs inside lines are collapsed; choose Remove line breaks to join lines.
Are non-breaking spaces removed?
Remove all whitespace removes them. To turn them into normal spaces while keeping the text readable, use the Invisible Character Remover.
Can I join lines with something other than a space?
Use the List to Text tool, which joins lines with any separator.