Word & Text Tools

Find and Replace

Replace every occurrence of a word or pattern in your text at once, with options to match case, target whole words only, or use a regular expression for advanced patterns. A live counter shows how many replacements were made, and one click copies the result.

With "regular expression" on, the Find field is treated as a regex (e.g. \d+ for numbers) and you can use $1, $2 in the replacement for captured groups. All processing stays in your browser.

How to use find and replace

Paste your text, type what to find and what to replace it with, and the result updates instantly along with a count of how many replacements happened. Three toggles control the match: "match case" makes the search case-sensitive so "Cat" and "cat" are treated differently, "whole word only" prevents partial matches so replacing "cat" leaves "category" untouched, and "use regular expression" switches the find field into full pattern-matching mode. Copy the cleaned text when you are done.

Whole-word matching explained

The most common find-and-replace mistake is an unwanted partial match. If you replace "cat" with "dog" in a normal search, you also turn "category" into "dogegory" and "concatenate" into "condogenate". Whole-word matching fixes this by requiring a word boundary on each side of the match, so only the standalone word "cat" is replaced and longer words that merely contain those letters are left alone. Turn it on whenever you are swapping a real word rather than a fragment, and leave it off when you genuinely want to change part of longer words.

What regular expressions unlock

With the regex toggle on, the find field accepts a regular expression — a compact pattern language for describing text. This lets you do things a plain search cannot: match any run of digits with \d+, collapse repeated spaces, reformat dates, strip everything inside brackets, or capture part of a match and reuse it in the replacement with $1 and $2. For example, finding (\w+)@(\w+) and replacing with $2 at $1 rewrites the two halves of a simple token. Regex is powerful and worth learning, but it is also easy to over-match, so always check the replacement count and preview before trusting a complex pattern.

Practical uses and tips

Writers use it to change a character or product name consistently across a whole document. Developers reformat data, swap delimiters, and clean exports. Editors standardise spelling — turning every "color" into "colour" or every straight quote into a curly one — in a single pass. When you are unsure whether a replacement is safe, do it on a copy first and watch the count: if the number is far higher than you expected, you are probably matching inside longer words, so switch on whole-word matching. For case-sensitive data like codes and identifiers, turn on match case to avoid clobbering something that only differs by capitalisation. And because the whole operation runs in your browser, even a large document is replaced instantly with nothing uploaded.

FAQ

How do I avoid replacing part of a longer word?

Turn on "whole word only". It requires a word boundary on each side of the match, so replacing "cat" no longer affects "category" or "concatenate".

What can I do with the regular expression option?

You can match patterns rather than fixed text — digits, repeated spaces, anything inside brackets — and reuse captured groups in the replacement with $1, $2, and so on. It is powerful but easy to over-match, so check the count.

Why does the replacement count look too high?

You are likely matching inside longer words. Enable whole-word matching, or make your search term more specific, and the count should drop to what you expected.

Is the search case-sensitive?

By default no. Turn on "match case" when capitalisation matters, such as with codes, identifiers, or proper names.

Is my text uploaded?

No. Find and replace runs entirely in your browser, so your text never leaves your device.

More free tools