Find & Replace
Find text and replace it instantly — supports plain text matching and full regular expressions, right in your browser.
Disclaimer. This tool is provided for informational purposes only. Verify important results independently. Read full disclaimer →
About Find and Replace Tool
Find and replace is one of the most-used text editing operations. This tool supports plain text substitution, case-sensitive matching, whole-word matching, and regular expression (regex) patterns for advanced users. Regular expressions enable powerful bulk replacements - for example, replacing all dates in DD-MM-YYYY format with YYYY-MM-DD for database import.
Practical applications: standardising formatting in data exports (replacing em dashes with hyphens, standardising quote styles); bulk updating text in content before publishing; cleaning up data by removing specific characters, tags, or patterns; replacing placeholder text with real values in template documents. The preview function lets you see all matches before applying replacements to avoid unintended changes in complex documents.
Worked Example: Cleaning a Short Text
Suppose the input box holds Cat, concat, catalog. Cat and you want to swap “cat” for “dog”. The result depends heavily on which options you tick:
- Plain text, case-insensitive, replace all: result
dog, condog, dogalog. dogwith 4 replacements. The letters inside “concat” and “catalog” match too. - Regex mode with
\bcat\b: resultdog, concat, catalog. dogwith 2 replacements, because\bonly matches at word edges. - Case sensitive, plain text, find “cat”: result
Cat, condog, dogalog. Catwith 2 replacements; the capitalised words are left alone. - Replace all unchecked: only the first match changes, giving
dog, concat, catalog. Catand a count of 1.
The “Replacements” pill under the output is a quick sanity check. If you expected 2 and see 4, the pattern is matching more than you intended.
Common Mistakes
- Expecting
$1or$2to work in the Replace box. This tool inserts your replacement text literally. Running(\d{2})-(\d{2})-(\d{4})against two dates and replacing with$3-$2-$1gives the literal string$3-$2-$1twice, not reordered dates. - Forgetting that case sensitivity is off by default. Unless the checkbox is ticked, “Apple” and “apple” are both replaced.
- Leaving regex mode on for ordinary text. Characters such as
.,(and?have special meanings, so a plain full stop will match every character. - Matching part of a word. Replacing “he” also changes “the” and “when”. Use a word-boundary pattern in regex mode when you need whole words.
- Pasting the result back without checking the count. Review the output and replacement number first, especially on long documents.
Where You Would Use This
- Template filling: swap a placeholder such as
[CLIENT]for a real name in a letter you reuse. - Data clean-up: turn semicolons into commas before importing a list, or strip a repeated prefix from product codes.
- Editing drafts: change a product name or spelling variant everywhere in an article before publishing.
- Log and config tidying: replace an old server name with a new one across a pasted block of settings.
A habit worth building: before replacing anything in an important document, work on a copy. Run the search with the “Replace all” box unticked first, check that the first match is the one you meant, then tick it again for the full pass. If the replacement count is much higher than you expected, adjust the pattern, turn on case sensitivity, or switch to regex mode with word boundaries, and compare the result with the original before you paste it back.