About this space remover
Extra spaces sneak in when text is copied from PDFs, typed with two spaces after each sentence, or pasted from a table. This tool cleans them up with seven modes. Collapse extra spaces fixes uneven spacing without touching the words; Remove all spaces is handy for phone numbers, codes, and IBANs; Trim lines and Remove blank lines tidy up lists; Compact does all of those at once; and Single line or Remove all whitespace squeeze text for fields that do not accept line breaks.
How to remove spaces
- Paste your text. Paste the text to clean, or press an example. An example only fills the box.
- Choose a cleanup mode. Pick the mode that matches the result you want; each option shows what it does.
- Press Remove spaces. The cleaned text appears below with the number of spaces before and after.
- Copy or start over. Press Copy text or Download, or press Clear to empty the box.
Frequently asked questions
Which mode removes double spaces between words?
Collapse extra spaces. It turns every run of two or more spaces or tabs into a single space and leaves everything else alone.
What is the difference between Remove all spaces and Remove all whitespace?
Remove all spaces deletes spaces and tabs but keeps line breaks, so lines stay separate. Remove all whitespace deletes line breaks too and returns one continuous string.
What does Keep line breaks do?
With it on, modes such as Collapse extra spaces keep your lines as they are. Turn it off to join the lines with a space as well. Single line and Remove all whitespace always remove line breaks.
Are non-breaking spaces removed?
Yes. Non-breaking spaces, which often come from web pages and Word documents, are treated like normal spaces in every mode.
How do I remove spaces only at the start and end of lines?
Choose Trim lines. For more control, such as trimming only one side or only tabs, use Remove Leading and Trailing Spaces.