Remove extra spaces & blank lines

Clean up messy spacing from copy and paste: double spaces, tabs, spaces at the start or end of lines, spaces before commas, and long runs of blank lines.

  • No sign-up
  • Text never leaves your device
  • Instant, unlimited
  • Works offline
0 characters
OptionsYour choices are remembered

How to use it

  1. Paste your text.
  2. Choose what to clean.
  3. Copy the tidy result.

What counts as extra whitespace?

  • Two or more spaces in a row (common after old “two spaces after a full stop” habits).
  • Tabs mixed with spaces.
  • Spaces at the start or end of a line, invisible but annoying in code and spreadsheets.
  • Several empty lines in a row.
  • Non-breaking and other Unicode spaces that look normal but are not.

Private by design

Everything happens on your device in your browser. Your text is not uploaded, logged or stored, and the page keeps working if you go offline after it has loaded. Only your option choices are saved, in your own browser.

Frequently asked questions

How do I remove double spaces in Word?

In Word use Find and Replace: find two spaces and replace with one, repeating until nothing is found. Or paste the text here and every run of spaces is collapsed at once.

Does it remove line breaks too?

No, only extra blank lines. To join lines, use the Remove Line Breaks tool.

Is indentation kept?

Turn off “Trim each line” and “Tabs → spaces” to keep indentation.

More free text tools