Remove extra spaces from text

Text pasted from PDFs and websites often has double spaces and stray tabs. This turns every run of spaces into one and keeps your line breaks.

FreeNo sign-upNothing is uploaded

Nothing is uploaded. Your text stays on your device.

Popular uses

Opens the tool with the right settings already chosen.

How to remove line breaks

Three steps, about ten seconds.

  1. 01

    Paste your text

    Paste text into the left box, or open a .txt file.

  2. 02

    Pick how to clean it

    Remove all line breaks, keep paragraphs, remove duplicate lines or remove extra spaces.

  3. 03

    Copy or download

    The result updates as you type. Copy it, or download it as a .txt file.

What counts as an extra space

Two or more spaces in a row, tabs and non-breaking spaces (the invisible kind that comes from web pages) all become a single normal space.

Spaces at the start and end of every line are removed. Line breaks stay where they are; to join lines too, choose Remove all line breaks.

More about remove line breaks and all its options

Frequently asked questions

Will it remove the spaces between words?

No. Words keep one space between them. Only the extra ones go.

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

Paste it into the box on the left and choose Keep paragraphs. Each paragraph becomes one line, with a blank line between paragraphs.

Is my text uploaded?

No. Everything happens in your browser, and nothing is sent anywhere.

Is there a limit?

No daily limit. Up to 2 million characters at a time, which is several books.