- Home
- All tools
- Text & writing tools
- Find and replace
Find and replace
Swap one string for another across a whole document, with whole-word matching, case sensitivity and regular expressions when you need them — and a count of how many matches it found before you commit.
- Runs on your device
- Regex supported
- Counts matches first
Find and replace
Nothing is uploaded — your text stays in this tab
Find and Replace
Find text and replace it with something else
Case sensitivity, whole-word matching and regular expressions, all optional
Three steps, about a minute
Paste your text
Anything from a paragraph to a long document. Nothing leaves this tab.
Set what to find
Type the string, then decide whether case matters and whether it has to be a whole word. The match count updates so you can check before replacing.
Replace one or all
Replace First steps through them one at a time; Replace All does the lot and tells you how many it changed.
The three switches that prevent accidents
- Whole word only. Without it, replacing art also rewrites start, party and chart. This is the option that saves documents.
- Case sensitive. Off by default so you catch every variant; on when you are renaming a code identifier and the case is part of the name.
- Regular expressions. For the jobs plain text cannot do — collapsing runs of whitespace, reformatting dates, stripping everything between two markers.
- Match count before you commit. Seeing 47 matches before pressing Replace All is how you catch a pattern that was broader than you thought.
About this tool
What does whole word only actually do?
It requires a word boundary on both sides of the match, so cat matches the word cat but not catalogue or concatenate. Leave it on for ordinary word swaps; turn it off when you are replacing part of a word or a fragment like a file extension.
How do I use the regex option?
Tick Use regex and the find box is read as a JavaScript regular expression. A few that come up often: \s+ matches any run of whitespace, ^ and $ anchor to the start and end of a line, and \d matches a digit. Capture groups you write as (...) can be put back in the replacement as $1, $2 and so on.
Can I undo a replace?
Not inside the tool, so keep a copy of the original before you press Replace All. The match count is there to be checked first — if the number is much larger than you expected, the pattern is catching something you did not intend.
Why does my regex not match anything?
Usually an unescaped special character. A full stop, question mark, bracket or plus sign all mean something in a regular expression, so to match a literal one you put a backslash in front of it. If you only wanted plain text, untick the regex box.
Is there a limit on document size?
No fixed cap. The work happens in your browser, so a long document is fine; a very large one with a complicated regex may take a moment to run.
Related writing tools
Your text, your device
The replacement runs in your own browser. Nothing is uploaded, stored, or logged — closing the tab is all the cleanup there is.
Missing a setting?
Tell us what this tool should also do. Suggestions decide most of what we build next.
124 more tools where this came from
PDF, writing, image, SEO, research, and calculators — all free, all without an account.