textcleanups

Remove empty lines

Delete the blank lines from your text, or shrink long gaps down to a single blank line.

Options
Blank lines

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 empty lines

  1. Paste your text into the first box.
  2. Pick Remove all to delete every blank line, or Max one in a row to keep paragraph spacing but remove the big gaps.
  3. Copy the result from the result box.

Lines that look empty but aren't

A line can look blank but still contain spaces or tabs. These are common in text copied from websites, code editors and spreadsheets. Many find-and-replace tricks miss them. With Treat lines with only spaces as empty on, they're removed too.

Remove all or keep one

Remove all is best for lists, code and data, where every blank line is noise. Max one in a row is best for prose: paragraphs stay separated by a single blank line, and the gaps of three or four blank lines that pile up after copying and pasting are reduced to one.

Common uses

  • Tidying lists copied from web pages
  • Cleaning exported chat logs and transcripts
  • Preparing data for import into a spreadsheet or database
  • Removing blank lines from code or config files

Questions

Will it remove my paragraph breaks?

Only if you choose Remove all. Choose Max one in a row to keep a single blank line between paragraphs.

Why do some blank lines not disappear in other tools?

They usually contain spaces or tabs you can't see. This tool treats those lines as empty by default.

How do I remove blank lines in Notepad++ or VS Code?

Both support regular expressions in Find and Replace: search for ^\s*$\n and replace with nothing. Pasting here does the same without needing the pattern.