Skip to content
CleanGlyph home

Find & Replace Text Online

Find and replace words, phrases or regex patterns across your text. Match case, limit to whole words and use capture groups, all instantly in your browser.

Your text never leaves your browser.

0 charactersAnalyzed as you type

Result

Paste text and enter a search term to see the result.

Find & replace

Inserted exactly as typed, including $ signs.

Matching

Treat uppercase and lowercase letters as different, so cat does not match Cat.

Skip matches inside longer words, so cat does not match cats or category.

Interpret Find as a JavaScript regex, applied globally with multiline ^ and $ anchors.

How to find and replace text online

Paste your text, type what to look for in Find and what to put in its place in Replace with. Every occurrence is replaced at once and the result updates while you type. Matches are found in a single pass from left to right, so replacing cat with cats never loops, and overlapping occurrences are not counted twice.

Case-sensitive vs case-insensitive matching

By default capitalization is ignored, so cat matches Cat and CAT. Turn on Match case when only the exact spelling should change, for example to rename a variable without touching a sentence that starts with the same word. The replacement is always inserted exactly as you typed it.

Replace whole words without affecting other words

Whole words only skips matches that are part of a longer word. Boundaries are Unicode-aware: letters with accents, Lithuanian ą or ž, Cyrillic, Greek, combining marks, digits and underscores all count as part of a word.

cat → dog (default)
dog owners love dogs.
The dogegory contains a dog.
cat → dog (whole words only)
dog owners love cats.
The category contains a dog.

Find patterns with regex and capture groups

Turn on Use regular expressions to search with JavaScript regex syntax. The pattern is applied to the whole text, and ^ and $ match at the start and end of every line. In Replace with, $1 inserts the first captured group, $<year> a named group and $& the whole match. For example, Find (\w+)@example\.com with Replace with $1@example.org changes the domain but keeps each user name. Outside regex mode these characters are treated literally, so a search for $9.99 or a replacement of $1 works exactly as typed.

Each regular expression runs in a background worker. Patterns that would take longer than about one second are stopped and no changes are made, so a runaway pattern cannot freeze the page. To debug a pattern first, see every match, offset and capture group in the Regex Tester.

Remove words by replacing them with nothing

Leave Replace with empty to delete every match. Surrounding spaces are kept, so include a space in Find or clean up afterwards with Remove Extra Spaces. To strip symbols and punctuation by category instead of by pattern, use Remove Special Characters.

How formatting and Unicode are preserved

Only the matched text changes. Tabs, trailing spaces, blank lines, emoji and the original LF, CRLF or CR line endings are kept as they are, and the text is never trimmed or normalized. To review exactly what changed, paste the before and after into the Text Difference Checker. For broader cleanup such as invisible characters or smart quotes, try the Text Cleaner, and to change capitalization everywhere use the Case Converter.

Frequently asked questions

How do I find and replace text online?

Paste your text, type the word or phrase in Find and what it should become in Replace with. Every match is replaced instantly and the result updates as you type, ready to copy.

Is find and replace case-sensitive?

Not by default, so cat also matches Cat and CAT. Turn on Match case to replace only occurrences with exactly the same capitalization.

How do I replace a whole word without changing longer words?

Turn on Whole words only. Searching for cat then skips cats, category and concat. Word boundaries understand accented letters, Cyrillic, other scripts, digits and underscores.

How do I delete a word from my text?

Leave Replace with empty. Every match is removed and nothing else changes. Surrounding spaces stay, so you may want to include a space in Find or tidy up afterwards with Remove Extra Spaces.

Can I use regular expressions and capture groups?

Yes. Turn on Use regular expressions to search with JavaScript regex syntax. In Replace with, $1 and $2 insert numbered groups, $<name> inserts a named group and $& inserts the whole match. Invalid patterns show an error and leave your text untouched.

Why did my regular expression stop?

Some patterns, such as nested repeats like (a+)+, can take extremely long on certain text. Each regex runs in the background and is stopped after about one second so the page stays responsive. When that happens no changes are made.

Is my text uploaded anywhere?

No. Searching and replacing runs entirely in your browser. Your text, search term and replacement are never sent to a server or included in analytics.