Find and replace text
Cleaning up a document, renaming a term across a code snippet, or reformatting pasted data all come down to the same task: swap every occurrence of one string for another. This tool does bulk find-and-replace on any text you paste, with an optional regular-expression mode for patterns the simple version cannot reach, and a live count of how many replacements it made.
How it works
Paste your text, type what to find and what to replace it with, and the
result updates instantly. With regex off, the find value is matched literally —
every exact occurrence is swapped. With regex on, the find value is treated as
a JavaScript regular expression, so you can use character classes, anchors, word
boundaries and capture groups (referenced as $1, $2 in the replacement). The
case-insensitive toggle ignores letter case while matching. All matches are
replaced in one pass and the replacement count tells you how many were made.
Worked examples
Literal replace. Find colour, replace color in a paragraph: every colour
becomes color and the count shows the total swapped. Case-insensitive mode would
also catch Colour and COLOUR.
Reformatting dates. Turn ISO dates like 2026-05-30 into UK style 30/05/2026:
- Find (regex on):
(\d{4})-(\d{2})-(\d{2}) - Replace:
$3/$2/$1
Collapse extra whitespace. Replace multiple spaces or tab runs with a single space:
- Find (regex on):
\s+ - Replace:
(one space)
Whole-word replacement. Replace cat without touching catch or scat:
- Find (regex on):
\bcat\b - Replace:
dog
| Mode | Find | Replace | Example result |
|---|---|---|---|
| Literal | colour | color | ”the color is nice” |
| Case-insensitive | hello | hi | ”Hi World” → “hi World” |
| Regex | \s+ | | collapses whitespace runs |
| Regex + capture | (\w+)@(\w+) | $1[at]$2 | obfuscates email domains |
Practical guidance
Common mistakes. A literal search is case-sensitive by default, so the will
not match The unless you enable case-insensitive mode. In regex mode, characters
like ., *, (, and + have special meaning — if you want to match a literal
period or parenthesis, escape it: \. or \(.
Capture groups in replacements. Wrap part of your pattern in ( ) and refer
to it as $1, $2, etc. in the replacement field. For example, find "(.*?)" and
replace with «$1» to change all double-quoted phrases to guillemets.
Count sanity-check. The replacement count appears after the operation. A count of zero when you expected matches usually means the find text is wrong — check for trailing spaces, case mismatches, or an unescaped special character.
All processing happens in your browser — nothing is uploaded.