How to use Find and Replace
- Paste your text into the input box.
- Type the text to find and the text to replace it with.
- Turn on "Match case", "Whole word only" or "Regular expression" if you need them, then copy the result.
Features
- Replaces every match and shows how many replacements were made
- Plain text mode treats special characters such as . and $ literally
- Optional regular expressions, with $1 and $2 for captured groups
- Match case and whole-word options
- Clear message if the regular expression is not valid
Supported formats and limits
- Maximum input: 5,000,000 characters
Examples
| Input | Result |
|---|---|
| The cat sat. Cat naps. Find: cat Replace with: dog | The dog sat. dog naps. (2 replacements) |
| cat concat Find: cat Replace with: dog (Whole word only) | dog concat (1 replacement) |
| 10-20 Find: (\d+)-(\d+) Replace with: $2/$1 (Regular expression) | 20/10 (1 replacement) |
Limitations
- Regular expressions use the JavaScript syntax of your browser; other tools may differ slightly. A very complex pattern on a very long text can be slow. Whole word means not touched by a letter, digit or underscore on either side.
Learn more
Find and replace is one of the most useful editing operations, but browsers and word processors do not always offer it where you need it: in a pasted log, a list of URLs, a block of code or a text field on a web page. Doing it here lets you work on any pasted text without installing anything or uploading it.
Plain mode is the safest choice for ordinary words, because characters with special meaning in patterns, such as dots, brackets and dollar signs, are matched exactly as you type them. Regular expressions add power: you can match digits, reorder parts of a date with capture groups, or remove everything between two markers. Start with a small sample, check the replacement count and the preview, and only then run the pattern on the full text.
Frequently asked questions
How do I replace text online?
Paste your text, type the word or phrase to find and what to replace it with. The result shows below with the number of replacements.
What does "Whole word only" do?
It replaces a match only when it is not part of a longer word, so "cat" is replaced in "the cat sat" but not in "concat".
How do I use regular expressions?
Turn on "Regular expression" and write a JavaScript pattern. In the replacement, $1, $2 and so on insert the groups you captured, and $& inserts the whole match.
Why does plain mode replace "." literally?
In plain mode your text is taken exactly as typed, so a dot matches only a dot, not any character. Switch on regular expressions if you want pattern matching.
Last reviewed: September 30, 2026