Find and Replace Text
Replace every match in your text at once. Type what to find and what to replace it with, preview the highlighted matches, then apply.
Type something in "Find" to see a live match preview here.
A faster way to clean up and edit text
Find and replace is one of the oldest tricks in text editing for a reason: it turns a tedious, error-prone manual scan into one click. Instead of scrolling through a document hunting for every "teh" or every outdated product name, you type the term once, type its replacement once, and every occurrence changes together — consistently, without the fatigue-driven typos that creep in when you fix things by hand one at a time.
How this tool works
- Paste or type your text into the box.
- Type the word or phrase you want to find.
- Type what you want to replace it with (leave this empty to delete every match instead).
- Check the live match count and the highlighted preview — nothing changes yet at this point.
- Click Replace All to apply, or adjust the options first if the preview shows matches you didn't expect.
The preview updates as you type, so you always see exactly what will change before you commit to it. If a search term matches nothing, the tool says so plainly instead of leaving you guessing.
Example 1 — a simple word swap. Text: "The color of the logo matches the color of the packaging." Find color, replace with colour. Result: "The colour of the logo matches the colour of the packaging." — both instances update, and the match count shows 2 before you apply.
Example 2 — Whole word only avoids partial matches. Text: "cat, category, concatenate, bobcat". Find cat without any options: it matches inside every one of those words (4 matches total). Turn on Whole word only and it matches just the standalone word "cat" (1 match) — "category", "concatenate" and "bobcat" are left untouched.
Example 3 — regex mode with capture groups. Text: "John Smith, Jane Doe". Turn on Regular expression, find (\w+) (\w+), replace with $2, $1. Result: "Smith, John, Doe, Jane" — the two capture groups swap first and last name for every name in the list at once.
Choosing the right options
| Option | What it does | Example |
|---|---|---|
| Match case | Distinguishes uppercase from lowercase | "Sun" won't match "sun" or "SUN" |
| Whole word only | Skips matches that are part of a longer word | "cat" won't match inside "category" |
| Regular expression | Treats Find as a pattern, not literal text; Replace can use $1, $2 group references | \d{3}-\d{4} matches any phone-style number |
The three options can be combined. For instance, a case-sensitive whole-word regex search is useful for renaming a specific identifier in code or configuration text without touching similarly named variables.
Common uses and safe-editing tips
- Cleaning up pasted text: collapse repeated spaces with regex
\s+replaced by a single space, or strip stray characters copied from a PDF or webpage. - Renaming consistently: update a product name, variable name, or placeholder everywhere it appears in a draft, config file, or script snippet.
- Preview before you commit: always glance at the highlighted matches first — it's the fastest way to catch an overly broad search before it changes something you didn't intend.
- Made a mistake anyway? Click Undo right after applying to restore the text to the moment before that replacement.
Sources & further reading
Frequently asked questions
How do I find and replace text online for free?
Paste or type your text into the box, enter the word or phrase you want to find, and type what you want in its place, then click "Replace All". For example, searching for "color" and replacing with "colour" across a paragraph updates every instance at once. The live preview highlights every match before you apply anything, so you can check exactly what will change first. Everything runs locally in your browser — nothing is uploaded.
What's the difference between Match case and Whole word only?
Match case makes the search distinguish uppercase from lowercase, so searching for "Log" with Match case on will not touch "log" or "LOG". Whole word only stops partial matches inside longer words — searching for "cat" normally also matches the "cat" inside "category" or "concatenate", but with Whole word only turned on it matches just the standalone word "cat". You can combine both options at once for a precise, case-exact, whole-word search.
How does regex mode work, and what happens if my pattern is invalid?
Turning on Regular expression treats the Find field as a JavaScript regular expression instead of plain text, so patterns like \d+ (one or more digits) or colou?r (matches both spellings) become usable, and $1-style references in Replace with reuse captured groups. If the pattern is invalid — for example an unmatched parenthesis — the tool shows the exact error message instead of silently failing, and the Replace All button is disabled until the pattern is fixed.
Can I undo a find and replace after applying it?
Yes. After clicking Replace All, an Undo button appears that restores the text exactly as it was one step back. The tool keeps a single level of undo — enough to recover from an unwanted replacement — but it doesn't keep a longer history, so it's still worth checking the highlighted preview before applying if you want to be extra careful.
Is my text uploaded to a server when I use this tool?
No. Find and Replace Text runs entirely in your browser using standard JavaScript string and regular-expression functions — your text, find term, and replacement never leave your device and nothing is stored on a server. The only place anything is saved is your own browser's local storage, so you can close the tab and come back to your last text later.