Skip to content

Find and Replace

Search a block of text and replace every match at once. Use plain text or a regular expression, match case, match whole words only, see matches highlighted with a live count, and undo if the result isn't what you wanted. Nothing is uploaded.

Runs in your browserFreeNo sign-up

Processed on your device. Files and text stay in your browser and are not uploaded to our servers. How privacy works

How to use the find and replace

  1. Paste your text into the Text box and enter what to find. Matches are counted and highlighted immediately.
  2. Type the replacement (leave it empty to delete matches). Switch on Regex for patterns, Case sensitive, Whole word or Multiline as needed.
  3. Check the Result preview, then click Replace all. The text box is updated so you can run another replacement.
  4. Use Undo to step back through up to 20 replacements, then copy or download the final text.

Features

  • Plain-text or regular-expression search with live match count
  • Matches highlighted in place, and a result preview before you commit
  • Case-sensitive, whole-word and multiline options
  • Capture groups: use $1, $2 in the replacement when Regex is on
  • Undo history so mistakes are cheap
  • Clear error messages for invalid patterns

Regular expression tips

Patterns use JavaScript syntax. \d matches a digit, \s whitespace, \w a word character, and . any character. Wrap part of the pattern in parentheses to capture it and refer to it as $1 in the replacement: finding (\w+)@(\w+) and replacing with $2 at $1 swaps the two sides. With Multiline on, ^ and $ match at the start and end of each line rather than the whole text, which is handy for adding a prefix to every line: find ^ and replace with - .

When Regex is off, every character is matched literally, including . * ( ) and $, so you can search for prices and file names without escaping anything.

Whole-word matching

Whole word prevents “cat” from matching inside “concatenate”. It treats letters, digits and underscores in any script as word characters, so it works with accented and non-Latin text as well as English.

Frequently asked questions

How do I replace line breaks or tabs?

Turn on Regex and search for \n for a line break, \r\n for Windows line endings, or \t for a tab. To insert a line break in the replacement, type \n there as well; in regex mode the tool expands it.

Why does my pattern show an error?

The pattern isn't valid JavaScript regex syntax, most often an unclosed bracket or parenthesis or a stray backslash. The message under the Find box explains what the engine rejected. Switch Regex off to search for the text literally.

Can I replace only the first match?

Not directly; Replace all changes every match. To change a single occurrence, make the pattern more specific, for example by including surrounding words, or edit that spot by hand in the text box.

Does it handle large documents?

Yes, within reason. Counting stops at 20,000 matches and highlighting is limited to the first few thousand to keep the page responsive, but Replace all still processes the whole text.

Other tools people use alongside Find and Replace.

You might also like

Something useful from another corner of VoltKit.