How do I find and replace text across a whole document at once?
Paste your text into FixDoks's Find and Replace tool, type what to find and what to replace it with, and every match updates instantly. Turn on match case, whole words only or regular expressions for more control. The status line shows how many replacements were made, and nothing leaves your browser.
Find and Replace at a glance
| Input | Any text plus a find and replace pair |
|---|---|
| Output | Updated text with a count of replacements made |
| Processing | In your browser; your files are not uploaded |
| Price | Free |
| Works on | Chrome, Edge, Safari and Firefox on Windows, Mac, Android and iPhone |
How to use Find and Replace Text
- Paste your text in the top box.
- Type the word or phrase to find, and what to replace it with. Leave the replace box empty to delete it.
- Choose Match case, Whole words only or Use regular expression if needed.
- The result updates as you type. Copy or download it, or click Use result as input to do another replacement.
Replace text in bulk
Change a product name throughout a document, swap a date format, remove every occurrence of a phrase, or fix a word you misspelt fifty times. Paste the text, type what to find and what to replace it with, and every match is replaced at once. The status line tells you how many replacements were made, so you know it worked.
Options
- Match case: with this off, "delhi", "Delhi" and "DELHI" are all found. Turn it on to replace only the exact capitalisation you typed.
- Whole words only: finds "cat" but not "category" or "concatenate". Works with Hindi and other scripts as well as English.
- Use regular expression: treats the find box as a pattern instead of plain text (see below).
To make several different replacements, do the first one, click Use result as input, then type the next pair.
Regular expressions, a quick guide
A regular expression (regex) is a pattern that can match many different strings. Here are patterns people use most:
| Find (regex) | Replace with | What it does |
|---|---|---|
\s+ | a single space | Turns runs of spaces, tabs and line breaks into one space |
^\s+|\s+$ | (empty) | Removes spaces at the start and end of the text |
\d{10} | XXXXXXXXXX | Masks 10 digit mobile numbers |
(\d{2})/(\d{2})/(\d{4}) | $3-$2-$1 | Changes 25/12/2026 to 2026-12-25 |
(\w+)@(\w+) | $1 at $2 | Uses captured groups in the replacement |
\n\n+ | \n | Removes blank lines |
In the replace box, $1, $2 and so on insert the text matched by each pair of brackets, $& inserts the whole match, and \n inserts a line break when regex mode is on. To find a character that has a special meaning in regex, such as a full stop or a bracket, put a backslash before it: \. or \(. If the pattern has a mistake, the tool shows the error instead of changing your text.
The regex engine is the one built into your browser (JavaScript regular expressions). It supports lookahead, lookbehind and named groups written as (?<name>...) and used as $<name>.
When to use this instead of Word
Word and Google Docs have find and replace too, but this tool is handy for text from anywhere: an email, a web form, a CSV, code or a chat export. It is also quicker for regex work, and you see the full result before you paste it back.
Undoing a mistake
Your original text is never changed. The result appears in a separate box, so if a replacement goes wrong, adjust the find or replace text and the result updates from the original again.
Frequently asked questions
How do I delete a word everywhere?
Can I use regular expressions?
How do I replace line breaks?
\n. Replace it with a space, a comma or anything else.