Skip to content

Text Find & Replace

Find and replace text with case-sensitive, whole-word and regular-expression options. See every match highlighted, replace one at a time or all at once, undo changes, and copy or download the result.

Text & Document Runs client-side Free to use
Jump to the tool
Share: X WhatsApp
Loading Text Find & Replace…

About the Text Find & Replace

Text Find & Replace searches any block of text and replaces matches the way you choose. Plain searches can be case-sensitive or limited to whole words, and regular-expression mode supports JavaScript patterns with capture groups such as $1 in the replacement. Every match is highlighted in a safe preview, with a running count, so you can see exactly what will change before you change it.

Matching runs in a separate background worker with a strict two-second limit, so a slow or badly written pattern is stopped with a clear message instead of freezing the page. Your text is never changed when nothing matches, Unicode text (accents, emoji, other scripts) is handled correctly, and each replacement can be undone. Everything happens in your browser and nothing is uploaded.

How to use

  1. Paste or type your text into the Text box.
  2. Enter what to find and, optionally, what to replace it with (leave it empty to delete matches).
  3. Choose Case-sensitive, Whole words only or Regular expression as needed and check the highlighted matches.
  4. Click Replace Next to change the next match, or Replace All to change every match; use Undo Last Replace to step back.
  5. Copy the result or download it as a .txt file, choosing LF or CRLF line endings.

Key features

  • Case-sensitive, whole-word and regular-expression modes.
  • Highlighted preview with match count and the next match marked.
  • Replace Next, Replace All and multi-step Undo Last Replace.
  • Regex runs in a time-limited background worker; syntax and timeout errors are shown clearly.
  • Unicode-aware matching and safe plain-text rendering of your content.
  • Copy Result and Download .txt with LF or CRLF line endings, plus Reset and Back.

Best practices

  • Check the match count and highlights before clicking Replace All.
  • Use Whole words only to avoid changing parts of longer words (for example “cat” in “category”).
  • Test regular expressions on a small sample first, and keep a copy of the original text.
  • In regex mode, escape special characters such as . * ? ( ) with a backslash when you mean them literally.
  • Use Undo Last Replace straight away if a replacement is not what you expected.

Benefits

  • Make many consistent edits in seconds.
  • See every change before it happens, with nothing altered silently.
  • Safe to experiment — slow patterns are stopped and changes can be undone.
  • Private: your text never leaves your browser.

Frequently asked questions

What does Whole words only do?

It only matches your search when it is not part of a longer word, so searching for “art” finds “art” but not “start” or “artist”. Letters and numbers from any language count as word characters.

Which regular-expression syntax is used?

JavaScript regular expressions, with the g (global) and m (multiline) flags so ^ and $ match at the start and end of each line. Unicode mode (the u flag) is on by default and can be turned off. In the replacement, $1, $2… insert captured groups, $& inserts the whole match and $$ inserts a dollar sign.

What happens if my pattern is too slow?

Patterns run in a background worker that is stopped after two seconds. You will see a timeout message, your text is left unchanged, and the page stays responsive.

Will my text change if nothing matches?

No. If there are no matches, the tool says so and leaves your text exactly as it was.

Are line endings preserved?

Line breaks are kept where they are. Browsers store line breaks in text boxes as LF, so the download offers LF or CRLF (Windows) line endings — choose the one your file needs.

Is my text uploaded?

No. Searching and replacing happen entirely in your browser, and the text is displayed as plain text, never run as HTML or code.