Text Tools

Find and Replace

Replace every occurrence of a word, phrase or pattern in a block of text. Turn on case-insensitive matching or enter a regular expression for advanced edits; the number of replacements is shown instantly.

  • 100% free
  • Private: runs in your browser
  • No sign-up
  • Live results
  • Updated

How to use the find and replace

  1. Paste your text into the input box.
  2. Enter the text to find and the replacement.
  3. Tick case-insensitive or regular expression if needed.
  4. Check the replacement count, then copy the result.

Plain text and regular expressions

By default the search text is matched literally, so special characters such as . and ? are treated as ordinary characters. Tick Regular expression to use patterns: \s+ matches runs of whitespace, \d{3} matches three digits, and (\w+)@(\w+) captures parts you can reuse with $1 and $2 in the replacement.

An invalid pattern shows an error instead of changing your text. Case-insensitive matching ignores capitalisation in the search.

Editing tasks that suit it

  • Swapping a term across a long document, such as replacing a company name.
  • Removing a character, such as every comma, by leaving the replacement blank.
  • Turning a list into a comma-separated line by replacing \n with , .
  • Varying an over-used word identified with the Word Frequency Counter.

Afterwards, tidy spacing with Remove Extra Spaces and recount with the Word Counter.

Frequently asked questions

Is the search case-sensitive?

By default yes. Tick case-insensitive to ignore case.

Can I use capture groups?

Yes, with regular expressions: $1, $2 and so on in the replacement.

Does it change the original?

No. The result appears in a separate box.

More tools for the same job