BrowserTools

Find and Replace

Bulk text replacement with regex support

By Guga — BrowserTools maintainer, Tbilisi, Georgia Updated 2026-09-17
Free Private No uploads
What is Find and Replace?

A bulk replacement across a single pasted document, with the matching mode under your control. Literal mode treats the search text exactly as typed, so dots, brackets and asterisks are just characters and cannot go wrong. Regular expression mode hands the pattern to the engine, which opens up capture groups and backreferences. That difference shows up in the replacement field as well: in literal mode a dollar sign is a dollar sign, so $1 stays $1, while in regex mode $1 inserts whatever the first group matched. Matching is case-insensitive unless you tick the box, which is the opposite of most editors. The count under the input updates on every keystroke, and an invalid pattern is reported in the output rather than silently matching nothing.

Find and replace text across your entire input with literal or regular-expression matching, case control and a replacement preview. Like your editor's find-replace, but for one-off pastes.

Private Find and Replace In Your Browser

Find and Replace is processed locally with client-side JavaScript. Your files never touch a server, and there is no queue to wait in.

Step-by-Step

How to use Find and Replace

1

Enter the text to look for in the Find field.

2

Enter the replacement in the Replace with field; leaving it empty deletes the matches.

3

Tick Regular expression to treat Find as a pattern, and Case sensitive to require an exact match.

4

Read the count of replacements made, then copy the transformed text from the Result box.

Key Capabilities
  • Literal or regular-expression matching from a checkbox
  • Case sensitivity optional, with case-insensitive matching as the default
  • Live count of how many substitutions were made
  • Dollar signs in a literal replacement are treated as plain characters
Common Use Cases
  • A developer swapping a deprecated API name for its replacement across a pasted configuration file.
  • A writer normalising inconsistent capitalisation of a product name in a long document.
  • A data cleaner reformatting a column of dates with a pattern such as (\d+)-(\d+)-(\d+) into a different order.
Clear Answers

Frequently Asked Questions

Why is my $1 not being replaced?
In literal mode a dollar sign has no special meaning, so $1 is inserted exactly as typed. Turn on regular expression and the same text becomes a backreference that inserts whatever the first capture group matched, which is the standard behaviour of a replacement string. Check which mode is active before concluding the feature is broken.
Can I do a whole-word replacement?
Use a regular expression with word boundaries: \bcat\b matches the word on its own and leaves concatenate and catatonic alone. Literal mode has no equivalent, so a plain search for cat will also hit the middle of longer words. Keep the pattern simple, since a complex one is the usual cause of a surprising result.
What happens with a broken pattern?
The result box reports an invalid regular expression instead of attempting a substitution, so a typo cannot quietly produce a document with nothing changed. The literal path never fails this way, because the pattern is generated internally from escaped characters.
Is matching case-sensitive by default?
No, matching ignores case until you tick the case-sensitive box. That is worth double-checking when a document contains both a variable and a class of the same name, since the insensitive default will replace both.