Skip to content

Find and replace text online

Replace every occurrence of a word or phrase in a block of text, with options for case, whole words and regular expressions, and see how many matches were replaced.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Paste your text or open a file.
  2. Enter what to find and what to replace it with.
  3. Set case, whole word and regex options.
  4. Copy or download the result.
Try it now

Basic find and replace

Type the text to find and the replacement. Every occurrence is replaced at once, and the note under the result shows how many replacements were made. Leave Replace with empty to delete every occurrence.

Example with the default sample text:

  • Text: The apple is red. The apple is sweet. Apples are good.
  • Find apple, replace with pear
  • Result: The pear is red. The pear is sweet. Apples are good.

Apples wasn't changed because the search is case-sensitive by default. Turn on Ignore case and it becomes pears are good (the replacement is inserted exactly as you typed it, so the capital A is lost).

Whole words and case

  • Ignore case treats apple, Apple and APPLE as the same.
  • Whole words only matches the search term only when it isn't part of a longer word. Searching for cat then skips category and concatenate. Word boundaries work with accented letters and digits too.

These two options together cover most everyday edits: renaming a product throughout a document, fixing a misspelled name, or swapping a placeholder like [CLIENT] for a real name.

Find and replace step by step

A common real-world job: a contract template uses [CLIENT] and [DATE] placeholders.

  1. Paste the template.
  2. Find [CLIENT], replace with Acme Corp., and copy the result back with Use result as input.
  3. Find [DATE], replace with November 13, 2026.
  4. Download or copy the finished text.

Leave Regular expression off for this: square brackets have a special meaning in regex, but in normal mode they are matched literally.

Regular expressions

Turn on Regular expression for pattern-based replacements. The search uses JavaScript regex syntax with Unicode support. In the replacement you can use:

TokenInserts
$1, $2 …The text matched by a capture group
$<name>A named group, from (?<name>…)
$&The whole match
$$A literal dollar sign

Some handy patterns:

TaskFindReplace
Swap "Last, First" to "First Last"(\w+), (\w+)$2 $1
Change MM/DD/YYYY to YYYY-MM-DD(\d{2})/(\d{2})/(\d{4})$3-$1-$2
Collapse repeated spaces {2,} (one space)
Remove spaces at line ends`[ \t]+(?=\n$)`
Wrap numbers in brackets\d+[$&]

If the pattern has an error, such as an unclosed bracket, the tool shows the error message instead of changing your text. Note that ^ and $ match the start and end of the whole text, not of each line.

Working with files

Use Open file to load .txt, .csv, .md, .html, .json and other plain-text files, then Download the edited version. That makes it easy to update a config file, fix a term across a long Markdown document, or clean up a CSV export.

For related jobs, try filter lines to keep or remove whole lines that contain a word, or add prefix and suffix to lines to change every line at once.

Your text stays in your browser; nothing is uploaded or saved.

Frequently asked questions

How do I replace a word everywhere in a text?

Paste the text, type the word in Find and the new word in Replace with. All occurrences are replaced at once.

How do I delete a word from a text?

Enter the word in Find and leave Replace with empty.

Is the search case-sensitive?

Yes, unless you turn on “Ignore case”.

Can I use regex capture groups?

Yes. Turn on “Regular expression” and use $1, $2 or $<name> in the replacement.

How do I avoid replacing parts of other words?

Turn on “Whole words only”, so “cat” no longer matches inside “category”.

Last updated: November 12, 2026

Recommended

Similar tools

If Find and replace helped, you may need these too.

See all in category →

People also use