Remove extra spaces
Collapse repeated spaces and tabs and trim messy whitespace from text.
Related tools
Remove extra spaces
Paste any text and this tool tidies its whitespace in one pass: runs of spaces and tabs collapse into a single space, leading and trailing whitespace disappears from every line, and invisible special characters such as non-breaking spaces turn into regular ones. It is the quickest fix for text copied from PDFs, websites, Word documents or spreadsheet cells, where double spaces and stray tabs pile up unnoticed.
Each cleanup step is a separate option, so you stay in control. "Collapse multiple spaces" merges any run of spaces or tabs into one space. "Trim line ends" removes whitespace at the start and end of each line — useful for indented email replies or code comments. "Normalize special spaces" converts non-breaking spaces, thin spaces and other Unicode space characters into ordinary spaces, which fixes the classic problem of find-and-replace not matching text that looks identical. Turn on "Collapse blank lines" to also squeeze several empty lines between paragraphs down to a single one.
The tally under the output shows how many characters came in, how many remain and how many were removed, so you can see at a glance whether the text actually contained hidden whitespace. Windows and Unix line endings are both handled, and even long documents are processed in milliseconds.
Everything runs locally in your browser. Your text is never uploaded to any server, so it is safe to clean up confidential contracts, internal reports or unpublished drafts. Copy the result or download it as a .txt file when you are done.