Find and Replace Text
Search and replace text in bulk — literal or regular-expression mode, with case-insensitive, whole-word, multiline and dot-all options and a live match count. Everything runs locally in your browser.
About this tool
Find and Replace lets you search a block of text and swap out every match at once — either as a plain literal string or as a full regular expression. It handles the tedious edits that a normal text box makes painful: renaming a variable across a log dump, fixing a repeated typo, or reshaping delimited data into a new format.
Everything runs locally in your browser with JavaScript, so even large pastes of source code, logs or private data never leave your machine. A live match count tells you exactly how many replacements will happen before you commit to them.
How to use
- Paste or type your source text into the input area.
- Enter the text you want to find, then the replacement text.
- Toggle regex mode on if you need patterns, capture groups or backreferences like $1.
- Fine-tune with the case-insensitive, whole-word, multiline and dot-all switches.
- Watch the live match count to confirm how many hits will change.
- Copy the result, or clear everything and start again.
Features
- Two modes: literal string search or full JavaScript regular expressions.
- Case-insensitive matching for text that mixes upper and lower case.
- Whole-word option so "cat" does not match inside "category".
- Multiline flag so ^ and $ anchor to each line, not just the whole text.
- Dot-all flag so a dot in your pattern also matches newlines.
- Backreferences such as $1 and $2 to reuse captured groups in the replacement.
- Live match count and 100% local processing — nothing is uploaded.
Frequently asked questions
Is my text sent anywhere when I use find and replace?
No. All searching and replacing runs in your browser with JavaScript. Your text, including any code or logs, never leaves your device.
What is the difference between literal and regex mode?
Literal mode treats your search term as exact characters, so symbols like . or * match themselves. Regex mode interprets the search as a pattern, letting you match ranges, repetitions and capture groups.
How do I reuse part of the match in the replacement?
Turn on regex mode and wrap the part you want to keep in parentheses to create a capture group. Reference it in the replacement with $1 for the first group, $2 for the second, and so on.
Why does whole-word matching still miss some results?
Whole-word matching uses word boundaries, so it only matches when your term is surrounded by non-word characters. Hyphens and punctuation count as boundaries, which can split words you expected to be joined.
Can I replace text across multiple lines?
Yes. Paste multiline text as-is. Use the multiline flag to anchor ^ and $ to each line, or the dot-all flag if you need a dot in your pattern to also span line breaks.