Search tools

Type to filter all tools

Find and Replace

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Everything runs locally in your browser. Your data never leaves your device.

Next steps

Send this tool's output straight into another tool.

About the Find and Replace

This tool finds text and replaces it, live, in everything you paste. Text mode replaces every occurrence of a plain string. Regex mode takes a full regular expression with flag controls and capture group references, for the replacements a plain string cannot express.

It covers the gap between a quick manual edit and opening an editor: fixing a name across a document, rewriting URLs in a list, reformatting dates with a pattern.

What you can do

  • Replace all occurrences of a word or phrase in one go.
  • Match case or replace whole words only.
  • Replace with a regular expression, using groups like $1 in the replacement.
  • Control the regex flags: global, ignore case, multiline and dot matches newline.
  • See how many replacements were made.

How to use the Find and Replace

  1. 1Choose Text or Regex mode.
  2. 2Enter what to find and what to replace it with.
  3. 3Set the options: match case and whole word in text mode, the flags in regex mode.
  4. 4Paste your text on the left and read the result on the right, then copy it.

Text mode is always literal

In text mode nothing is interpreted. Searching for $5 (net) finds exactly those characters, and a $ in the replacement stays a $. Match case requires the exact capitalization you typed, and whole word stops 'cat' from matching inside 'catalog'.

Regex mode in short

Regex mode uses JavaScript regular expressions. The replacement understands $1 and named groups like $<name>, plus $& for the whole match. The global flag is on by default so every match is replaced, turn it off to replace only the first. Multiline makes ^ and $ match at each line break, which is handy for prefixing every line. An invalid pattern shows the error instead of guessing.

If you just want to understand a block of JSON rather than rewrite text, the JSON Inspector is the better fit.