textcleanups

Find and replace

Replace every match of a word, phrase or pattern in your text at once.

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 find and replace

  1. Paste your text into the first box.
  2. Type what to find, and what to replace it with. Leave Replace with empty to delete every match.
  3. Check the count of replacements, then copy the result.

Options

Match case

Off by default, so color also matches Color and COLOR. Turn it on when capitals matter.

Whole words only

Stops partial matches. Replacing color with colour normally changes colorful to colourful as well, which is sometimes what you want. With whole words only, just the standalone word changes.

Regular expressions

For advanced searches, turn on regular expressions. A few useful patterns:

FindReplace withWhat it does
(\d{4})-(\d{2})-(\d{2})$3/$2/$12026-10-14 becomes 14/10/2026
^- Adds a dash at the start of every line
\s+$(empty)Removes spaces at the end of each line
,\s*\nPuts each comma-separated item on its own line

Use $1, $2 and so on to insert captured groups, $& for the whole match, and \n for a new line. ^ and $ match the start and end of each line.

Questions

Can I replace text with a line break?

Yes. Turn on Use regular expressions and type \n in Replace with.

Can I delete every occurrence of a word?

Yes. Type the word in Find and leave Replace with empty.

Why does it say my pattern isn't valid?

With regular expressions on, characters like ( [ * + ? and . have special meanings. Turn regular expressions off to search for them as plain text, or put a backslash before each one.