Find and replace text

Search a text for a word or phrase and replace it by something else, everywhere at once. Add more pairs to replace several things in one go. The text is processed in your browser and nothing is uploaded.

Use \n for a new line and \t for a tab.

How it works

  1. Paste your text

    Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.

  2. Instant result

    The result appears as you type. Change the options and see straight away what changes.

  3. Copy or download

    Copy the result with one click, save it as a file or use it as input for a next step.

Example

The default pair replaces weather by sunshine (the example text is The weather is nice. It is warm weather today.). The result is The sunshine is nice. It is warm sunshine today., and the note reports 2 replacements.

Options

  • Match case (default on): Apple and apple are different. Untick it to match both.
  • Whole words only: skips matches inside longer words.
  • Regular expression (advanced): powerful patterns with groups.

Regular expression examples

Search Replace with Effect
(\d{2})-(\d{2})-(\d{4}) $3-$2-$1 31-12-2026 becomes 2026-12-31
\s{2,} a single space collapses runs of spaces
(\w+)@(\w+) $2 at $1 swaps the parts of an address

An invalid expression gets a message instead of an error.

Related

To remove all special characters in one go, use remove special characters. To clean spaces, remove double spaces. To see what changed, compare text shows the differences between the original and the result.

Frequently asked questions

How do I replace several words in one go?

Click *Add another replacement* and enter a second pair. The pairs are applied in order, from top to bottom, and the note tells you how many replacements were made in total.

How do I replace a line break or a tab?

Type `\n` for a line break and `\t` for a tab in the search or replacement field.

How do I use regular expressions?

Tick *Regular expression*. In the replacement you can use `$1`, `$2` for captured groups and `$&` for the whole match. For example, searching `(\d{2})-(\d{2})-(\d{4})` and replacing with `$3-$2-$1` turns `31-12-2026` into `2026-12-31`.

What does Whole words only do?

It only matches the search text when it stands alone: `cat` is not found in `category`. Without it, every occurrence is replaced.