Whitespace Cleaner
Trim lines and clean up extra spaces, tabs and empty lines.
Clean up copied text
Text copied from PDFs, emails or websites often contains double spaces, invisible trailing spaces, stray tabs and runs of empty lines, which breaks formatting when you paste it elsewhere.
Cleaning options
- Trim spaces at the start and end of lines
- Collapse multiple spaces into one
- Remove empty lines or reduce them to one
- Replace tabs with a number of spaces
Tick the options you need and get tidy text instantly. Processing happens in your browser.
How to use Whitespace Cleaner
- Paste the text to clean.
- Tick the cleanup options to apply.
- The clean text appears instantly.
- Copy the result.
Why use this tool?
Get text ready for publishing or data processing without fixing it by hand.
FAQ
Can I convert tabs to spaces?
Yes. Tabs are replaced with the number of spaces you choose.
Will it fix line breaks in text copied from a PDF?
It removes empty lines and extra spaces. To join lines into paragraphs, use Join / Split Lines.
Does it remove invisible characters?
It cleans spaces and tabs. To find other invisible characters, use the Unicode Inspector.
Related tools
Remove Duplicate Lines
Remove repeated lines from a list in one click while keeping the original order.
Open toolFind and Replace
Find and replace text with case sensitivity and regular expression support.
Open toolCase Converter
Convert text to UPPER CASE, lower case, Title Case, camelCase, snake_case and more.
Open toolWord Counter
Count words, characters with and without spaces, sentences, paragraphs and reading time instantly.
Open tool