Find and Replace
Replace every occurrence of a word, phrase or pattern in a text at once, and see exactly how many replacements were made.
About Find and Replace
Find and Replace changes every occurrence of a word, phrase or pattern in one go and tells you how many replacements it made. It works on any plain text: a draft article, a list, a CSV export, a block of code or a template you reuse with different names.
Three options control what counts as a match. Case-sensitive treats Colour and colour as different. Whole words only skips matches inside longer words, using letters from any language, so café does not match inside cafés. Regular expression lets you describe a pattern instead of fixed text.
When to use it
- Switch spelling, for example British to American English, across a long document.
- Rename a product, person or variable everywhere at once.
- Reformat dates, phone numbers or codes with a regular expression.
- Delete a repeated phrase by leaving “Replace with” empty.
Worked example
Text: Colour and colours: the colour chart. COLOUR! Find colour, replace with color.
- With no options, 4 replacements are made:
color and colors: the color chart. color! - With Whole words only,
coloursis left alone and 3 replacements are made. - With Case-sensitive as well, only the lower-case
colourchanges: 1 replacement.
Note that the replacement is inserted exactly as typed, so COLOUR became color in lower case.
For a regular expression, take Due 14/11/2026, paid 03/12/2026., find (\d{2})/(\d{2})/(\d{4}) and replace with $3-$2-$1. The result is Due 2026-11-14, paid 2026-12-03. with 2 replacements.
Good to know
- In regular expression mode,
$1inserts the first captured group (named groups work too),$&inserts the whole match,\na new line and\ta tab. In plain mode,$is just a dollar sign. - An invalid pattern shows an error and changes nothing. A search that runs longer than 5 seconds is stopped so the page stays responsive.
- Select “Use result as new text” to chain several replacements.
- To check what changed, paste the before and after into Text Compare.
How to use Find and Replace
- Paste your text.
- Enter what to find and what to replace it with.
- Choose case-sensitive, whole words or regular expression if needed.
- Select Replace all and copy the result.
Privacy: how it works
Everything happens in your browser. Your text is not sent to any server.
Frequently asked questions
Which regular expression syntax is supported?
JavaScript syntax with Unicode support. In the replacement, $1 or $<name> inserts a captured group, $& the whole match, \n a new line and \t a tab.
What happens if my pattern is invalid or too slow?
An invalid pattern shows an error and nothing is changed. Searches run in the background and are stopped after 5 seconds, so a runaway pattern cannot freeze the page.
Do $ signs work in plain-text mode?
In plain mode the replacement is inserted exactly as typed, so $1 stays $1.