Text Tools

Free Find and Replace

Search and replace text in bulk with case-sensitive, whole-word and regex options. See every match highlighted live before you replace.

Live Match Preview 100% Private Regex Support Works on Mobile
Find
Replace
0 matches
Source Text INPUT
0 chars · 0 lines Source text
Replaced Text OUTPUT
0 chars · 0 lines

Live Match Preview

Every match is highlighted in yellow
Current match

What Is Find and Replace?

Find and replace is one of the most useful text operations you can perform. It searches through a block of text, finds every occurrence of a word, phrase or pattern, and replaces each match with something else — all at once. Instead of scrolling through 5,000 words and manually editing every instance of a name, URL or formatting issue, you do it in one click.

Every word processor has a find-and-replace feature, but a browser-based tool has advantages: you can paste text from anywhere, use regex for advanced patterns, see all matches highlighted before committing, and keep the original text intact as a backup.

How the tool works

  1. Paste your source text into the left editor.
  2. Enter what to find — literal text or a regex pattern.
  3. Enter what to replace it with — the new text.
  4. Watch matches highlight in the preview as you type.
  5. Click Replace All (or Replace First) to generate the output.

The three matching modes

Mode What It Does Example
Default Matches any occurrence of the string, case-insensitive. "cat" → matches "cat", "Cat", "CAT"
Case sensitive Only matches exact case. "Cat" → only "Cat"
Whole word Only matches complete words, not substrings. "cat" → not "category"
Regex Uses regular expressions for pattern matching. "\d+" → all numbers

Regex cheat sheet — the 10 most useful patterns

\d+
Any sequence of digits (numbers).
\w+
Any sequence of word characters (letters, digits, underscore).
\s+
Any sequence of whitespace (spaces, tabs, newlines).
.
Any single character (except newline).
[abc]
Any single character from the set a, b or c.
[^abc]
Any character NOT in the set.
^...$
Matches the start and end of a line.
\bword\b
Whole word boundary match.
(a|b)
Either "a" or "b".
a{2,5}
Between 2 and 5 consecutive a's.

Practical regex examples with capture groups

Swap first and last names

Find: (\w+)\s+(\w+)  ·  Replace: $2, $1

"John Smith" becomes "Smith, John".

Extract email domain

Find: @\w+\.\w+  ·  Replace: @example.com

Every email is normalized to use your domain.

Convert hyphens to underscores in URLs

Find: ([a-z]+)-([a-z]+)  ·  Replace: $1_$2

"my-page" becomes "my_page".

Remove all digits

Find: \d  ·  Replace: (empty)

Strips every digit from the text.

Collapse multiple spaces

Find: +  ·  Replace: (single space)

Turns runs of spaces into one space.

Common use cases

Rename Variables
Bulk-rename in code before refactoring.
Update URLs
Change old domain to new domain across content.
Fix Formatting
Remove double spaces, fix quotes, standardize dashes.
Replace Placeholders
Fill in [NAME], [DATE], [COMPANY] in email templates.
Clean CSV Data
Standardize phone numbers, dates, currency formats.
Redact Content
Replace sensitive strings with [REDACTED].
Translate Text
Update specific terms without re-translating everything.
Clean HTML
Remove attributes, comments or empty tags from markup.

Regex vs literal search — when to use which

Privacy and security

This find and replace tool runs entirely in your browser. Your text is never sent to any server, never stored anywhere, and disappears the moment you close the tab. Safe for confidential documents, private code, legal text and any content you want to keep local.

Frequently Asked Questions

What is a find and replace tool?
A find and replace tool searches text for a specific string or pattern and replaces every match with something else — all at once. It's used for bulk editing, cleaning up formatting, updating names or URLs, and standardizing content.
What is regex and do I need it?
Regex (regular expressions) is a mini language for matching text patterns. You need it when you want to find things like "every email address", "every URL", "any word starting with a capital letter", or "all phone numbers". For plain literal find-and-replace (replacing the word "apple" with "orange"), you don't need regex.
What does "whole word" mean?
When Match whole word is ON, only complete standalone words are matched. So searching for "cat" with whole word would match "cat" and "a cat sat" but NOT "category" or "catalog". When OFF, it would match the substring "cat" anywhere — so "category" becomes "Category" if you replaced "cat" with "Cat".
Does it support regex capture groups?
Yes. When regex mode is on, you can use capture groups in the find pattern (e.g. (\w+)@(\w+\.\w+)) and reference them in the replacement with $1, $2, etc. This lets you rearrange text — for example, swap the position of first and last names.
Is this find and replace tool case-sensitive?
By default, no. When case-insensitive, "Apple" and "apple" are both matched. Toggle "Case sensitive" on to require exact matches including capitalisation.
Can I undo the replacements?
Yes. The original text stays in the input box — the replaced text appears in the output box. If you don't like the result, just modify the find/replace fields or paste the original back in.
Can I replace with an empty string?
Yes. Leave the "Replace with" field empty to delete every occurrence of the find text. This is a common way to strip unwanted characters, formatting or comments from text.
Is this find and replace tool free?
Yes. It is 100% free, requires no sign-up, and runs entirely in your browser. Your text never leaves your device.

Related Text Tools

Done!