Skip to content
TextRuns in your browserPopular

Find and Replace

Search and replace text with literal strings or regular expressions, live.

Input
No upload needed — instant
Privacy
Nothing is uploaded
Cost
Free · no sign-up · no watermark

Loading tool…

The tool is loading its code on your device. This happens once and is cached for later visits.

Processed entirely on your device

Everything you type or paste is handled by JavaScript running in this tab. No request is sent, nothing is logged and nothing is stored. Close the page and it is gone.

Overview

About the Find and Replace

Find and replace text online using literal strings or regular expressions. Match whole words, choose case sensitivity, and see how many replacements were made.

Find and replace is the workhorse of text editing: renaming a term across a document, fixing a repeated typo, reformatting a column of data, removing a stray character that appears a hundred times. Doing it by hand is slow and error-prone; doing it with a live count in front of you is fast and safe.

Literal mode: exactly what you typed

By default the search term is treated as plain text. Every character — including regex specials like ., *, ? and ( — is matched literally, so searching for “a.b” finds “a.b” and not “axb”. This is what you want most of the time and it means you never have to think about escaping.

Two refinements apply in literal mode:

Case sensitivity. Off by default, so “The” and “the” both match. Turn it on when the difference matters.

Whole word. Replacing “cat” with “dog” would otherwise turn “category” into “dogegory”. Whole-word matching constrains the hit to complete words.

Regex mode: patterns and groups

Switching to regular expressions unlocks pattern matching. \d+ finds every run of digits, \s+ finds whitespace, ^\w finds the first letter of each word. Capturing groups let you rearrange what you match:

Find (regex)Replace withEffect
(\w+)\s+(\w+)$2 $1Swaps each pair of words
(\d{4})-(\d{2})-(\d{2})$3/$2/$1Reorders an ISO date
\s+$(empty)Strips trailing whitespace
$&(with context)Reinserts the whole match

An invalid pattern — an unbalanced bracket, a stray quantifier — raises a clear message rather than silently returning your text unchanged, so a broken expression is obvious immediately.

Knowing the scope before you commit

The replacement count is the safety net. Before you copy the result, you can see whether a change hit three times or three hundred. That number is the difference between a confident edit and an unpleasant surprise, and it is why a browser tool that shows it live beats a blind global replace in a text editor.

Step by step

How to use the Find and Replace

  1. Paste the text you want to edit into the input pane.

  2. Type what to find and what to replace it with.

  3. Choose literal or regex mode, and set case sensitivity or whole-word matching.

  4. Read the result and the replacement count, then copy or download it.

Why use it

Benefits and common use cases

What this tool is good for, and what it deliberately does not try to do.

Literal or regular expression

Default literal mode treats the search term as plain text, so punctuation is matched exactly. Switch to regex for patterns, capture groups and $1 / $& replacement references.

Whole-word and case control

Match complete words only so replacing “cat” does not touch “category”, and choose whether “The” and “the” are treated as the same.

Live replacement count

Every match is replaced as you type and the number of replacements is shown, so you can confirm the scope of a change before you commit to it.

Readable regex errors

An invalid pattern surfaces a clear message in the tool rather than silently doing nothing, which saves the guesswork when a bracket or quantifier is wrong.

Questions

Frequently asked questions

Short, honest answers about quality, limits and privacy.

What is the difference between literal and regex mode?

In literal mode the search term is matched exactly as typed — a dot is a dot, and special characters have no meaning. In regex mode the term is a pattern, so \d matches a digit, . matches any character, and parentheses capture groups you can reuse in the replacement.

How do I reuse part of the match in the replacement?

In regex mode, wrap the part you want to keep in parentheses and reference it in the replacement with $1, $2 and so on. Use $& to insert the entire match. For example, finding (\w+)@(\w+) and replacing with $1 [at] $2 rewrites an address while keeping both sides.

Does whole-word matching work with regex?

The whole-word switch applies to literal mode, where it wraps your term in word boundaries. In regex mode you express the same thing yourself with \b, which gives you full control over where the boundaries fall.

Can I use it to delete text?

Yes. Leave the “Replace with” field empty and every match is removed. In literal mode that deletes exact occurrences; in regex mode you can delete whole classes of text, such as all digits with \d+ or all blank lines.