textcleanups

Remove extra spaces

Remove double spaces, trailing spaces and tabs while keeping your line breaks exactly where they are.

Options

Your text stays in your browser. Nothing is uploaded or saved.

All text tools

Or fix everything at once with the all-in-one text cleaner.

AI-written text

ChatGPT text cleaner
Remove hidden characters, odd spaces and Markdown from AI answers.
Remove em dashes
Replace every — with a comma, period or hyphen.
Remove Markdown
Turn Markdown into plain text: no **, #, links or tables.
AI phrase finder
Highlight overused AI words and phrases.

Lines

Remove line breaks
Turn text broken across many lines back into clean paragraphs.
Remove duplicate lines
Keep the first copy of every line and delete the repeats.
Remove empty lines
Delete blank lines, or cut long gaps down to one.
Sort lines
Sort a list A to Z, Z to A, by length, reversed or shuffled.
Add line numbers
Number every line, your way.
Remove line numbers
Strip numbers and bullets from the start of lines.
Comma separator
Turn a list into comma-separated text, and back.

Spaces and characters

Remove extra spaces
Collapse double spaces, trim lines and replace tabs.
Remove special characters
Strip symbols and keep only letters, numbers and punctuation you choose.
Remove emojis
Delete every emoji, including skin tones, flags and combined emoji.
Remove accents
Turn é into e, ü into u and ß into ss.
Convert smart quotes
Turn curly quotes, long dashes and ellipses into plain text.

Formatting and counting

Case converter
Switch text to sentence case, Title Case, UPPERCASE, camelCase and more.
Find and replace
Replace words or patterns across your text, with regex support.
Strip HTML tags
Turn HTML into clean, readable plain text.
Word counter
Count words, characters, sentences and reading time as you type.
Text diff checker
Compare two texts and see what changed.
Word frequency counter
See which words you use most.
Reverse text
Flip text backwards, by letter, word or line.

How to remove extra spaces

  1. Paste your text into the first box.
  2. Leave the options on for a full cleanup, or turn off any you don't need.
  3. Copy the result from the result box.

Line breaks are never touched here. If you also want to join lines, use remove line breaks. To clean everything at once, use the all-in-one text cleaner.

The spaces you can't see

Not every space is a normal space. Websites and word processors often use a non-breaking space to stop two words splitting across lines. It looks identical, but search, spreadsheet formulas and code treat it as a different character. That's why a cell that seems to say London sometimes won't match London. This tool replaces non-breaking spaces and the other unusual space characters with ordinary ones.

Do you need two spaces after a period?

No. Two spaces after a sentence is a habit from typewriters, where every letter had the same width. Major style guides, including APA, Chicago and AP, now call for one space. Collapsing repeated spaces fixes this throughout a document in one step.

Common uses

  • Cleaning text pasted from PDFs, websites or old documents
  • Fixing spreadsheet values that won't match because of hidden spaces
  • Removing indentation from code or copied lists
  • Converting two spaces after a period to one

Questions

Will this remove the spaces between words?

No. Repeated spaces are collapsed to a single space, so words stay separated.

Does it change my line breaks?

No. Each line is cleaned separately and your line breaks stay as they are.

How do I remove extra spaces in Excel?

Use the TRIM function, for example =TRIM(A1). Note that TRIM doesn't remove non-breaking spaces, which this tool does.