About this tool
Replace text in bulk, with optional regex and case-insensitive matching.
Paste text, type what to find and what to put in its place, and every occurrence is swapped at once — the replacement always runs with the global flag, so it never stops at the first match. By default the search term is escaped and matched literally, so characters like a dot, a plus sign or a bracket mean themselves; flip the regex toggle to interpret the pattern as a JavaScript regular expression with capture groups, and flip the ignore-case toggle to add the case-insensitive flag. Output updates as you type and an invalid pattern prints the engine's own error instead of silently failing.
Open Find and Replace Tool on AltFTool — it loads instantly in your browser.
Paste your text into the Input panel, or press Load sample to start from "cats are great, cats are cute".
Enter the search term under Find and its substitute under Replace, then set the Regex and Ignore case toggles.
The Result panel rewrites as you type and prints the JavaScript engine's message on a broken pattern; press Copy to take the output.
With regex off, the search term is escaped before compiling, so searching for a period, an asterisk or a parenthesis matches that character instead of behaving as a wildcard.
You can run a case-insensitive plain-text swap without learning regex syntax, or a case-sensitive regex, instead of being forced into one combined mode.
An unbalanced bracket or a stray quantifier returns the JavaScript engine's message rather than an empty box, so you can see exactly which part of the pattern failed.
Every match. The pattern is always compiled with the global flag, so a single run swaps all occurrences in the text — there is no first-only mode. Ignore case adds the case-insensitive flag on top of it.
Turn on the regex toggle, wrap the parts you want to keep in parentheses, then refer to them in the replacement as $1, $2 and so on. $& inserts the whole match, and $$ inserts a literal dollar sign — those replacement tokens are interpreted whether or not regex mode is on.
That only happens when regex mode is on, where a dot is the any-character wildcard. Turn regex off and the term is escaped for you, or keep regex on and write the dot as \. so it matches a literal period.
Yes, in regex mode: \n matches a newline, \t a tab and \s any whitespace, so a pattern like \n{2,} collapses runs of blank lines. In literal mode you can also paste the actual character into the find box and it will be matched as typed.