Remove Extra Spaces

Tidy up text copied from PDFs, emails and web pages: collapse double spaces, trim the start and end of each line and remove empty lines.

INPUT

0 characters0 lines

OUTPUT

0 characters0 lines

Runs entirely in your browser. Nothing you enter is sent to a server.

How to remove extra spaces

  1. Paste your text

    Paste text with double spaces, ragged indents or stray blank lines.

  2. Choose what to clean

    Turn on the clean-ups you need. Line breaks are kept unless you remove empty lines.

  3. Copy the clean text

    The result shows how many characters were removed. Copy it back to where you need it.

Where extra spaces come from

Copying from PDFs, slides and web pages often brings along double spaces, tabs, non-breaking spaces and blank lines. They are hard to see but break searches, formulas and imports.

What counts as a space

Ordinary spaces, tabs and non-breaking spaces are all treated as spaces. Line breaks are only touched when you remove empty lines.

Frequently asked questions

Will paragraphs be merged?

No, line breaks stay where they are. Removing empty lines deletes the blank lines between paragraphs, so turn it off if you want to keep them.

Can I use it on code?

Be careful with code and Markdown, where indentation has meaning. Turn off trimming to keep the indentation.

Is my text uploaded?

No. Cleaning happens in your browser.