Find and Replace Text

Find and replace text, with regex support.

Options

Free online find and replace

This find and replace tool swaps one piece of text for another across your whole document in a single pass. Paste your text, type what you want to find, and type the replacement — every match updates live and the number of replacements is counted for you. It's perfect for fixing a repeated typo, renaming a term throughout a document, cleaning up exported data, or stripping unwanted characters by replacing them with nothing.

How to find and replace text

  1. Paste or type your text into the Text box.
  2. Enter the word or phrase you want to change in the Find field.
  3. Type its replacement in Replace with, or leave it empty to delete each match.
  4. Toggle Case sensitive, Whole word only, or Use regular expression as needed.
  5. Read the result and the replacement count, then click Copy output.

Matching options explained

Matching ignores case by default; turn on Case sensitive to match exact capitalisation. Whole word only skips matches that sit inside a larger word. Use regular expression treats the Find box as a pattern, so you can match numbers, whitespace, or anything else — for full pattern building, try the regex tester.

Private and instant

Everything runs in your browser, so your text never leaves your device. Need to tidy the result further? Send it to the remove line breaks tool to flatten messy paragraphs. There's no sign-up and no limit — bookmark this page for the next quick edit.

Frequently asked questions

How does find and replace work?

Paste your text into the main box, type what you want to find, and type what to replace it with. Every match is swapped instantly as you type and the number of replacements is shown below the output. Leave the replace field empty to simply delete the matched text.

What do the case-sensitive and whole-word options do?

By default matching ignores case, so "cat" also matches "Cat" and "CAT". Turn on Case sensitive to match the exact capitalisation only. Turn on Whole word only to skip matches that are part of a larger word — with it on, "cat" will not match inside "category" or "cats".

How do I use regular expressions?

Tick Use regular expression and the Find box is treated as a JavaScript regex pattern instead of literal text. This lets you match patterns such as \d+ for numbers or \s+ for runs of whitespace, and use capture groups like $1 in the replacement. If the pattern is invalid, a red message explains the problem and your text is left untouched.

Is my text sent to a server?

No. This find and replace tool runs entirely in your browser with JavaScript. Your text is never uploaded, stored, or shared, so it is safe to use with private or confidential documents.

Can I replace across many lines at once?

Yes. The tool works on the whole document at once, no matter how many lines it contains, and replaces every occurrence in a single pass. There is no fixed size limit, though very large texts may be slower on older devices.