Find & Replace

Replace literal text or regular-expression matches while preserving your original input.

Processed locally in your browser. Your input is not uploaded.

How to use Find & Replace

Find literal text or enable JavaScript regular expressions. Replace the first match or every match and choose case sensitivity.

Details and limits

Replacement text is always literal, including dollar signs: capture references such as $1 are not expanded. Patterns run in a disposable worker with a time limit. Text is limited to 100,000 characters; particularly slow patterns may be cancelled.

Practical example

Start with literal search for ordinary words; enable regular expressions for patterns. Replacement text is literal, so capture references such as $1 are not expanded.

In red apple, red pear, replace red with green and choose all matches. The result is green apple, green pear.

Frequently asked questions

How can I delete matched text?

Leave the replacement field empty and run the operation. Keep a copy of the source so you can review or undo removals.

Why are overlapping matches not all replaced?

JavaScript replacement uses non-overlapping matches. In banana, the two possible ana matches overlap, so replacing all does not replace both.

How do I search for a dot without matching any character?

Disable regex mode to search for a literal dot. With regex enabled, escape it as \. because an unescaped dot is a pattern operator.