How to find and replace text
- Paste your text into the big box and type what to find. Every match is highlighted and counted as you type.
- Type the replacement. The result box shows the finished text straight away, so you can check it before changing anything.
- Press Replace next match to change one match at a time, or Replace all to change everything. Undo brings the previous text back. Copy the result when you are done.
Match case treats Apple and apple as different, and Whole words only skips matches inside longer words, so “cat” is not found in “category”. Regular expressions use JavaScript syntax. To clean many things in one pass, add more searches: they run in order from the top.
Questions
Is my text uploaded anywhere?
No. Searching and replacing happen in your browser, in a background thread of this page. Nothing is sent to a server, so contracts, code, and private notes stay on your device.
How do I use groups like $1 in the replacement?
Turn on “Regular expression”, put part of the pattern in parentheses, and write $1, $2, and so on in the replacement. For example, finding (\w+)@(\w+) and replacing with $2 at $1 swaps the two parts. Named groups work as $<name>, and $& inserts the whole match.
Can I run several replacements at once?
Yes. Press “Add another search” and fill in another pair. The pairs run from top to bottom, so each one works on the text left by the one above it. Put the most specific replacement first.
How do I find or insert a line break?
In regular expression mode, write \n in the Find box to match a line break. In the Replace box, \n inserts a line break and \t inserts a tab, in either mode.
Why did a search stop with an error?
Some regular expressions, such as (a+)+$ on long text, take exponentially longer as the text grows. The search runs in the background with a three second limit so the page never freezes. Rewrite the pattern so each part can match in only one way.
Credits
Built by OneTooling using standard browser features. No third-party code runs on your data.