Find & Replace
Find and replace text in bulk with case and whole-word options or regular expressions with $1 groups, with matches highlighted.
0 characters · 1 line
Shortcut: Ctrl/⌘ + Enter to replace all
How to use
- Paste the text to work on into “Your text”, or click “Example” to try it out.
- Type what to look for in “Find” and the new text in “Replace with”. Leave it empty to delete the matches.
- Turn on “Case-sensitive” or “Whole words only” if needed, or switch to “Regular expression”.
- The result appears instantly on the right (below on phones), with every match highlighted below and the number of matches shown.
- Click “Copy” or “Download” to grab the result, or “Replace all” to put it back into the input for another round.
FAQ
Is my text uploaded?
No. Finding and replacing happen in your browser, and your text never leaves your device.
What can I use in a regex replacement?
$1, $2… insert a numbered group, $<name> a named group (for (?<year>\d{4}) use $<year>), $& the whole match and $$ a literal dollar sign. \n inserts a line break, \t a tab and \\ a backslash. In plain-text mode the replacement is inserted exactly as typed.
Which regex syntax is supported?
Your browser’s JavaScript regular expressions, always with the Unicode (u) and multi-line (m) flags: . matches a whole emoji or Chinese character, and ^ and $ match at the start and end of every line. Unicode mode is strict, so unnecessary escapes such as \- are reported as errors below the fields.
Does “Whole words only” work for Chinese?
It requires that no letter or digit comes right before or after the match, which suits languages with spaces between words: searching for cat skips category. Chinese has no spaces between words, so a Chinese term only counts as a whole word next to punctuation, spaces or line breaks.
Why was my search stopped?
Some patterns, such as (a+)+$, need exponentially many attempts on certain text and can freeze a browser for a long time. To keep the page responsive, regex searches run in the background and stop after 3 seconds with a notice. A more specific pattern (here a+$) usually fixes it.
Is it slow with long text?
Replacing and counting always cover the whole text. To keep the page smooth, the highlighted preview shows only the first 100,000 characters and the first 1,000 matches, and results update once you pause typing.
Are Windows line breaks (CRLF) kept?
Yes. Text with CRLF line breaks is searched with plain line breaks and converted back afterwards, so ^ never lands between CR and LF, and a \n in the replacement becomes CRLF as well.
Related tools
Regex Tester
Test JavaScript regular expressions live: highlight matches, list groups, preview replacements, with a syntax explainer and common patterns.Whitespace Cleaner
Trim trailing spaces, collapse blank lines and repeated spaces, remove zero-width and non-breaking spaces, convert tabs and line endings.Case Converter
Convert text to UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case and more, all at once.Text Diff
Compare two texts side by side or inline, with changed words highlighted, ignore whitespace or case, and copy a unified patch.