Find and replace text

Live replace with regex, whole word, and capture groups.

Find and ReplaceFree · never uploaded

Text is processed in this tab and never sent anywhere.

Text

0 characters

0 matches found

Preview (matches highlighted)

 

After replace all

How to find and replace text

  1. 01

    Paste the haystack

    A letter, a log, OCR output. It is not posted.

  2. 02

    Set find and replace

    Optional: case, whole word, regex with $1 groups.

  3. 03

    Step or replace all

    Preview stays on the page. Copy or download the result.

About find and replace

Find and replace is the job you do in an editor, until the text is in a browser because it came out of OCR, a PDF extract, or a CSV you do not want to open in Excel. imissfiles runs the search in this tab with a live preview: matches highlighted in the source, the result of replace-all in a second panel, and a count. Case sensitive, whole word, and regular-expression mode are checkboxes, not hidden menus. Nothing is uploaded, which matters when the haystack is a letter, a dump of emails, or a config with secrets.

Plain find is literal. Whole word wraps the query in a word boundary so “art” does not hit “party.” Case sensitive does what it says. Regex mode treats the find field as a JavaScript regular expression. If the pattern is invalid, you get the engine’s error inline — not a silent empty result. In regex mode the replace field understands capture groups: $1, $2, $&. A pattern like (\d{4})-(\d{2})-(\d{2}) with replace $2/$3/$1 is the usual date shuffle. Test on the example before you run it on a 4,000-line file.

Replace all is the nuclear option and the default people want. Step-through is for when you should not trust the pattern yet: Previous / Next moves the highlight, Replace this applies the substitution at the current match and keeps going. The stats line reads like “34 matches found · 34 would be replaced · viewing 4 of 34.” After replace-all, copy or download the output. The original box does not change until you apply, so you can still tweak the pattern.

Regex is powerful and easy to overfit. A greedy .* will eat more than you wanted. An unescaped dot matches any character. We do not try to sandbox your pattern beyond what the browser already does; we do run it in a worker so a catastrophic backtrack is less likely to freeze the UI, and we warn past about 5 MB. If the worker times out, shrink the haystack.

The natural workflow on this site is extract, then edit. PDF to Text, Image to Text, or OCR PDF first, then find-and-replace the OCR leftovers (“rn” that should be “m”, a wrong client name). Diff Checker is how you confirm the replacement did not take extra bites. Word Counter is how you confirm a caption still fits. All of it stays on this device.

Find and Replace FAQ

How do I use regex to replace text?
Turn on Regular expression. Find is a JavaScript regex. Replace can use $1, $2, and $& for groups. Invalid patterns show an inline error instead of failing silently.
What does whole word do?
It only matches the query with a word boundary on both sides, so “cat” does not hit “catalog.”
Can I replace matches one at a time?
Yes. Next / Previous moves the highlight. Replace this applies the current match. Replace all applies every match at once.
Does find and replace upload my text?
No. Search and substitution run in this browser, in a worker for large pastes.
Why did regex match too much?
A greedy .* consumes as much as it can. Make the pattern tighter, or use step-through before replace-all.
Can I replace across a PDF?
Not inside the PDF. Extract with PDF to Text or OCR PDF, run replace here, then keep the .txt. We do not write the PDF back.

Related tools