Skip to content
DayUtils

Remove Extra Spaces – Clean Up Pasted Text

Text copied from PDFs, emails, websites and old documents is often full of double spaces, stray tabs, blank lines and broken line breaks. Paste it here to collapse multiple spaces, trim each line, replace tabs, remove blank lines or join everything into one clean paragraph.

Loading tool…

How to use the extra space remover

  1. Paste your text, or press Try an example.
  2. Choose what to clean:
    • Turn multiple spaces into one
    • Trim the start and end of each line
    • Remove blank lines
    • Replace tabs with spaces
    • Join all lines into one paragraph
  3. Copy the clean text. The status line shows how many characters were removed.

Example

Before:

  This   text was    pasted	from a PDF.


   It has   double spaces,  tabs	and blank lines.

After (default options):

This text was pasted from a PDF.
It has double spaces, tabs and blank lines.

Where messy spacing comes from

  • PDFs store text by position on the page, so copying gives a line break at the end of every visual line and sometimes extra spaces for justified text.
  • Emails may insert line breaks at about 72 characters and add indentation for quoted replies.
  • Web pages use non-breaking spaces and invisible formatting characters.
  • Word processors can hide tabs and double spaces after full stops — once common with typewriters.
  • Spreadsheets add tabs between columns when you copy cells.

Why it matters

Extra spaces make text look sloppy when you paste it into a website, a form or a document. They can also break data: “London ” with a trailing space isn’t the same as “London” in a spreadsheet lookup, a database or a mailing list. Cleaning the text first avoids those hidden mismatches.

Tips

  • Join lines for prose, keep lines for lists and addresses.
  • Remove duplicates afterwards with remove duplicate lines — trailing spaces are a common cause of “duplicates” that don’t look identical.
  • Fix capitalisation with the case converter.
  • Replace specific characters, such as bullet symbols or odd dashes, with find and replace.

Hidden characters

Some characters are invisible but still cause problems: non-breaking spaces from web pages, zero-width spaces from some editors, and tab characters from spreadsheets. The cleaner converts non-breaking spaces and tabs into ordinary spaces before collapsing them, so the result contains only plain spaces and line breaks.

Cleaning data for spreadsheets and forms

Before pasting a list into a spreadsheet, a CRM or an online form, trim each line so values such as names, emails and postcodes match exactly. A single stray space at the end of “SW1A 1AA ” can make a lookup fail or create a second, near-identical record.

Keeping indentation

If you are cleaning code or a nested list where leading spaces matter, untick “Trim the start and end of each line” and “Replace tabs with spaces” so indentation stays.

One space or two after a full stop?

Two spaces after a sentence was a typewriter convention. Modern style guides — including the major American and British ones — recommend one space, and web browsers collapse extra spaces anyway. This tool turns double spaces into single spaces everywhere.

Count characters before and after with the character counter.

Frequently asked questions

How do I remove double spaces?

Paste your text with “Turn multiple spaces into one” ticked. Every run of two or more spaces becomes a single space.

How do I remove line breaks from text copied from a PDF?

Tick “Join all lines into one paragraph”. PDFs often break lines at the edge of each column, and this option joins them back into flowing text.

What are non-breaking spaces?

Special spaces that stop a line from breaking at that point. They look normal but can cause problems in search and data. The tool converts them to ordinary spaces.

Will it change my words?

No. Only spaces, tabs and line breaks are changed. Letters, numbers and punctuation stay exactly as they are.

Can I keep paragraphs but remove blank lines?

Yes. Leave “Join all lines” unticked and tick “Remove blank lines”. Each line stays on its own, with empty lines between them removed.

Is my text uploaded?

No. All cleaning happens in your browser.

Last updated: