Replace Text

Apply multiple find-and-replace rules simultaneously, with regex and whole-word support.

runs locally on your browser. Your data never leaves your device.

Replace Rules

Common Use Cases

Normalise a data export by replacing semicolons with commas and stripping extraneous quote pairs in one pass
Convert a list of variable names from camelCase to snake_case using a regex rule
Replace multiple placeholder tokens ({{name}}, {{date}}, {{company}}) in a template document with real values
Strip all HTML tags from a block of text using a single regex rule: find <[^>]+> and replace with empty string

About Replace Text

Multi-rule find-and-replace is one of the most productive text-processing operations available. Unlike a single find-and-replace pass, applying multiple rules simultaneously lets you transform an entire document in one step, with no repeated Ctrl+H dialogs and no risk of missing a pattern because an earlier substitution changed the text in an unexpected way.

Rules are applied in sequence from top to bottom, which means later rules see the output of earlier ones. This ordering matters: if Rule 1 replaces "cat" with "dog" and Rule 2 replaces "dog" with "fish", the final output will have "fish" everywhere both "cat" and "dog" appeared in the original. This chained behaviour is intentional and powerful, since it lets you build transformation pipelines.

The case-sensitive toggle controls whether all rules match case-insensitively (the default) or case-sensitively. The whole-words toggle wraps each find pattern in word boundary anchors (`\b`) so "cat" does not match "concatenate" or "tomcat". Both options are disabled when regex mode is active, since in regex mode you have full control over these behaviours by writing the pattern yourself (use `(?i)` for inline case-insensitivity, `\b` for word boundaries, etc.).

The per-rule replacement counter shown next to each row tells you how many matches each rule found, making it easy to spot rules that matched nothing (typo in the find field?) or rules that matched far more than expected.

Common workflows: normalising data exports (replace all `;` with `,` and all `""` with `"`), converting coding conventions (replace `camelCase` prefixes, swap `snake_case` separators), bulk-sanitising user-generated content (replace profanity with asterisks), and preparing text for a specific platform by substituting markdown, HTML entities, or special characters.

Frequently Asked Questions

Are rules applied to the original text or sequentially?
Rules are applied sequentially. Rule 2 runs on the output of Rule 1, Rule 3 on the output of Rule 2, and so on. This means earlier rules can affect what later rules match. If you need each rule to run independently on the original text and then merge the results, you would need to run separate replace passes and reconcile them manually.
How do I use a newline as the find or replace value?
In regex mode (toggle on), use \n to match a newline character in the find field. In the replace field, use \n to insert a newline. Without regex mode, the find and replace fields match literal text typed into them, and you cannot type a literal newline into a single-line input. For newline-based transformations, enable regex mode.
What regex flavour is supported?
The tool uses JavaScript's built-in RegExp, which implements the ECMAScript 2023 regex specification. This includes: character classes (\d, \w, \s, \b), quantifiers (*, +, ?, {n,m}), groups and backreferences ((...), \1), non-capturing groups (?:...), lookahead (?=...) and lookbehind (?<=...) on modern browsers, and the Unicode (u) flag for Unicode property escapes. Features not yet universally supported include \p{} Unicode properties on older browsers.
What does the replacement count show?
The small badge next to each rule shows how many times that rule's pattern was matched and replaced in the text as it existed at that point in the pipeline (after all preceding rules have run). A count of 0 means the pattern was not found. A count higher than expected usually means the previous rules changed the text in a way that created new matches.
Can I use capture groups in the replace field?
Yes, when regex mode is enabled. Use $1, $2, etc. in the replace field to refer to capture groups in the find pattern. For example, find '(\w+)\s+(\w+)' and replace with '$2 $1' to swap the first and second words of each pair. The full match can be referenced with $& if you need to insert it alongside other text.