VSThiran

Text & Writing

Free Extra Space Remover

Strip double spaces, stray tabs and blank lines out of pasted text.

Free to useNo sign-up requiredNo watermarkRuns in your browser

This free tool strips the whitespace mess out of pasted text: repeated spaces, stray tabs, trailing spaces at the end of lines, blank lines, and line breaks that landed in the middle of sentences.

It is aimed squarely at text copied out of a PDF, a slide deck or a web page - which almost always arrives with a line break at the end of every visual line, and needs joining back into real paragraphs before it can be reused.

How this tool works

  1. Paste your messy text

    Straight from a PDF, an email, a spreadsheet cell or a web page.

  2. Choose what to clean

    Each option can be turned on or off, so you can collapse spaces but keep your paragraph breaks, or strip everything into a single block.

  3. Copy the cleaned text

    The result updates live, and the tool reports how many characters of whitespace it removed.

How it works

Collapsing spaces turns any run of spaces and tabs into a single space, without touching line breaks. This is the fix for text where words are separated by two or three spaces.

Trimming lines removes whitespace from the start and end of every line, which is what leaves invisible trailing spaces behind when text is copied out of a table.

Collapsing blank lines reduces runs of empty lines to one, preserving paragraph structure. Removing blank lines strips them entirely, which suits lists.

Joining into one paragraph removes every line break. Use it on text copied from a PDF, where each visual line ends with a break that has nothing to do with where sentences actually end.

Windows, Mac and Unix line endings are all normalised first, so text behaves the same wherever it came from.

The PDF copy-paste problem

When you copy several paragraphs out of a PDF, every visual line usually arrives as its own line of text. Paste that into a document and the wrapping is wrong, because the breaks are in the middle of sentences.

The fix is to turn on "Join everything into one paragraph", which removes all the breaks, then re-insert the paragraph breaks you actually want by hand. It is far quicker than deleting them one at a time.

What this does not change

  • Your words. Only whitespace is touched - the word count is unchanged, which the tool shows you.
  • Punctuation and capitalisation. Use the free case converter if you need those adjusted.
  • Non-breaking spaces pasted from some editors are treated as ordinary spaces and collapsed with the rest.
  • Deliberate indentation in code will be removed by "trim lines", so leave that option off for source code.

Worked examples

Double spaces after full stops

An old typing convention that most style guides have dropped. Collapsing spaces fixes a whole document at once.

A table copied out of a PDF

Trim lines and collapse spaces, then paste into a spreadsheet - the columns usually line up far better.

Reflowing an extracted quotation

Join into one paragraph, then add breaks where the paragraphs really belong.

Frequently asked questions

Is this tool free?

Yes, free with no sign-up and no limit on how much text you clean.

Is my text sent anywhere?

No. Your text never leaves your device. Everything is processed by your browser as you type, so nothing is uploaded, stored or logged - which matters when the text is a draft, a contract or anything confidential.

Will it change my words?

No. Only whitespace is affected. The tool shows the word count before and after so you can see it is unchanged.

How do I fix text copied from a PDF that breaks mid-sentence?

Turn on "Join everything into one paragraph". That removes the line breaks the PDF layout inserted, giving you continuous text you can re-break where the paragraphs actually end.

Can I keep my paragraph breaks?

Yes. Leave "join into one paragraph" off and use "collapse repeated blank lines" instead - you keep one blank line between paragraphs and lose the extras.