Skip to content

Remove Extra Spaces

Collapse double spaces and trim the ends of every line.

Quick Tool Overview

Remove Extra Spaces collapses every run of two or more spaces down to one, trims whitespace off the ends of each line and clears the indentation that pasted text carries in with it. Line breaks and paragraph structure are left alone, so the document keeps its shape while the spacing gets fixed.

What it does
Collapses repeated spaces and trims line ends
You give it
Text pasted from a PDF, Word, a web page or a spreadsheet
You get back
The same text with single spaces and clean line ends
Best for
Cleaning up anything copied out of another program
Text Tools Free, unlimited use No sign-up Runs in your browser

About the Remove Extra Spaces

Text picks up extra spaces the moment it moves between programs. A PDF gives you padding where the columns were, Word leaves the double space after every full stop that someone was taught in 1988, and a copy out of a spreadsheet arrives with trailing spaces on every line. None of it is visible until it breaks something.

This tool collapses every run of two or more spaces down to a single space, trims whitespace from the start and end of each line, and optionally removes the space before punctuation that pasted text so often carries. Line breaks and paragraph structure are left alone, so you get clean spacing without losing the shape of the document.

Key features of the Remove Extra Spaces

Collapses without joining

Runs of spaces become one space, never none, so words stay separated and the text stays readable.

Trims both ends of every line

Leading indentation and trailing spaces both go — the trailing ones being the kind that break an exact match.

Fixes space before punctuation

The stray space before a comma or full stop that PDFs and French typography leave behind is removed on request.

Paragraphs survive

Line breaks and blank lines are preserved by default, so cleaning the spacing does not flatten the document.

Reports what it removed

A character count of what came out, so you can tell whether the problem you suspected was actually there.

How to use the Remove Extra Spaces

  1. 1

    Paste the text

    Anything copied from a PDF, a web page, Word or a spreadsheet.

  2. 2

    Choose what to collapse

    Runs of spaces, line-end whitespace, indentation and spaces before punctuation are each their own switch.

  3. 3

    Check the count

    The tool reports how many characters it removed, so you can see it actually did something.

  4. 4

    Copy the clean text

    Copy the result or send it back to the input box for another pass.

Frequently asked questions

No. Only runs of two or more consecutive spaces are collapsed, and they are collapsed to one — never to none. Words stay separated.

Reviews of the Remove Extra Spaces

What people who use the Remove Extra Spaces think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Remove Extra Spaces. It takes half a minute and no account.

Write the first review

More text tools