Find and Replace
Replace text across a whole document, with whole-word, case and regex options.
Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.
How to use the find and replace
- Paste your text and enter what to find.
- Check the match count, then set the replacement.
- Copy the result, or apply it and search again.
About this tool
The match count updates as you type, so you can see how many replacements a pattern will make before applying it — the check that prevents a careless replace turning 'car' into 'bus' inside 'carpet'. Whole-word matching solves exactly that case.
Regular expression mode passes your pattern straight to the browser's engine, so <code>$1</code> and <code>$2</code> in the replacement reuse captured groups. Ordinary mode escapes everything, so characters like <code>.</code> and <code>*</code> match themselves rather than acting as wildcards.
Common uses
- Renaming a term throughout a document.
- Stripping a repeated prefix from every line.
- Reformatting data with a capture-group pattern.
Frequently asked questions
- How do I avoid matching inside longer words?
- Tick 'whole words only'. Replacing 'car' without it also hits 'carpet' and 'scarce'.
- Can I reuse part of the match in the replacement?
- Yes, in regex mode. Wrap part of the pattern in brackets and refer to it as $1 in the replacement.
Related tools
Regex Tester
Test a regular expression against sample text with live highlighting and capture groups.
Text Cleaner
Strip extra spaces, blank lines, line breaks, smart quotes and unwanted characters.
Sort Lines
Sort lines alphabetically, numerically, by length, in reverse or shuffled.
Extract Emails, URLs & More
Pull email addresses, links, numbers, hashtags, mentions, IPs or dates out of any text.