Word Replacer
Find and replace words in any text, with case-sensitive, whole-word, and regex options. Stack multiple rules and run them in one pass.
How to use the word replacer
The tool runs in four scope modes. Pick the one that matches the kind of swap you need.
1. Word scope (default)
Replaces whole words only. Searching for cat with the default Whole word toggle on will not match category or concatenate. Example: replace every fox with cat in a story without touching foxglove.
2. Character scope
Replaces a single character (or a fixed run of characters) wherever it appears, ignoring word boundaries. Example: replace every comma with a semicolon, or every curly quote with a straight quote.
3. String scope
Replaces any sequence of characters, including parts of words. Searching cat in String scope matches inside category and concatenate. Use this for code, identifiers, URL slugs, or partial-token rewrites.
4. Regex scope
Treats the Find field as a JavaScript regular expression. Useful for patterns: phone numbers, email addresses, repeated whitespace, capture groups. Invalid patterns show a red error and skip the run instead of breaking the page. Example: replace (\d{3})-(\d{4}) with $1.$2 to switch hyphens to dots in phone numbers.
Word Replacer vs Text Replacer
This page is the same tool people search for as word replacer and as text replacer. The two terms point to the same job (find a string, swap it for another) and the SERP for both queries returns nearly the same set of pages. Splitting them across two thin pages would hand ranking equity to competitors. Instead, the Scope toggle covers both intents.
Pick Word for word-level edits (the default and the most common ask). Pick Character or String for partial swaps. Pick Regex when you need patterns. One page, four jobs.
When you need to replace text
Brand or product swap
A blog draft references your old product name. Run one rule across the whole post to switch every mention without missing one in a sidebar caption.
Censorship and redaction
Replace names, addresses, or sensitive terms with placeholders ([NAME], [REDACTED]) before sharing a transcript or report.
Mail merge with several swaps
Personalize a template by stacking rules: {{first_name}} to "Alex", {{company}} to "Acme", {{role}} to "Editor". All applied in one pass.
Translation drafts
Working through a rough translation, swap recurring source terms for target equivalents to speed up the pass and keep glossary consistency.
ESL exercise rewrites
Build cloze and substitution drills by swapping verb forms, articles, or pronouns across a passage. Toggle Replace all off to leave the first occurrence as a worked example.
Code identifier rename
Rename a variable or function across a snippet using String scope, or use Regex with word boundaries for safer multi-token rewrites that respect camelCase.
Whitespace and punctuation cleanup
Use Regex to collapse double spaces (\s+ to a single space) or normalize line endings before pasting into a CMS. To deduplicate phrases or tokens, hand the output to remove duplicate words. See also: remove commas.
Regex cheat sheet
For users who pick the Regex scope, here are the patterns that cover most jobs. The tool uses the JavaScript regex engine with the u (Unicode) flag enabled.
| Pattern | Matches | Example |
|---|---|---|
\d | Any digit (0 to 9) | \d{3} matches three digits in a row |
\w | Any word character (letters, digits, underscore) | \w+ matches a token |
\s | Any whitespace (space, tab, newline) | \s+ collapses runs of whitespace |
+ | One or more of the preceding token | a+ matches "a", "aa", "aaa" |
* | Zero or more of the preceding token | colou*r matches "color" and "colour" |
^ | Start of the input | ^The matches "The" at the start |
$ | End of the input | end$ matches "end" at the close |
[abc] | Any one of the listed characters | [aeiou] matches a single vowel |
(abc) | Capture group (referenced as $1, $2) | (\w+)\s+(\w+) + $2 $1 swaps words |
a|b | Either pattern a or pattern b | cat|dog matches "cat" or "dog" |
Frequently asked questions
What is the difference between Word and String scope?
Word scope matches whole words only. If you search for cat, it will not match category or concatenate. String scope matches any sequence of characters, including parts of words; searching cat in String scope matches inside category too. Use Word for natural-language edits and String for code, IDs, or partial-token replacements.
Can I undo a replacement?
The tool keeps your original text in the input box and the replaced version in the output box, so you always have both. To undo, copy back from the input or clear your rules and run again. There is no multi-step undo stack, so save your work in a separate document if you plan a long sequence of edits.
Is the find-and-replace case-sensitive by default?
Yes. By default, searching for cat will not match Cat or CAT. Toggle the Case-insensitive option in the rule row to match any casing. The replacement preserves the case style you typed in the Replace field rather than copying the matched casing back, so plan your rule text accordingly.
Can I run multiple find-and-replace rules at once?
Yes. The Replacement rules stack lets you add as many rule rows as you need, each with its own find, replace, and active toggle. All active rules are applied in order on a single click of Replace, so you can swap names, brand terms, and abbreviations in one pass.
What's the difference between word replacer and text replacer?
There is no functional difference on this page. Word Replacer and Text Replacer point to the same tool. Pick the Scope you need: Word for whole-word edits, Character for single-character swaps, String for partial-match substitutions, or Regex for pattern-based replacements.
Can I use capture groups in Regex mode?
Yes. Parentheses in the Find field create capture groups, and you can reference them in the Replace field with $1, $2, $3, and so on. For example, find (\w+)\s+(\w+) and replace with $2 $1 to swap pairs of adjacent words.
I run find-and-replace on contracts and NDA drafts. Does the document touch your servers?
No. The replacement happens locally in JavaScript. The source contract or NDA, the find/replace rules, and the rewritten output never leave the page. Your party names, dollar amounts, and clause edits stay private.
Is there a size limit on the text I can paste?
There is no hard limit, but the tool runs in your browser, so very long inputs (above one million characters) may slow down on older devices. For long documents, paste one chapter or section at a time and stack rules for each pass.
Related tools
More wordcounter.ai tools
Other tools you might find useful.