Done

πŸ” Find and Replace Text

Find, highlight and replace text online β€” with regex, case sensitivity, whole word matching, multi-rule batch replacement, and live preview. Free, no sign-up.

Input Text
Chars: 0
Words: 0
Lines: 0
Find & Replace
0 matches
Multi-Rule Replace
Rules are applied sequentially top to bottom.
Live Highlight Preview
Matches highlighted in yellow
Enter text and a search term to see highlights…
History
No replacements yet.
Regex Quick Reference
Pattern Matches
\d+ One or more digits
\w+ Word characters (a-z, 0-9, _)
\s+ Whitespace (space, tab, newline)
^ Start of line (with Multiline on)
$ End of line (with Multiline on)
. Any single character (not newline)
[a-z] Any character in range a–z
(x|y) x or y β€” alternation
$1, $2 Backreference to capture group in replace
\b Word boundary
? Zero or one of preceding
* Zero or more of preceding

How to Use the Find and Replace Tool

Step 1 β€” Paste your text: Enter or paste any text into the Input Text area, or click Sample to load a demo. Character, word, and line counts update instantly.
Step 2 β€” Enter Find pattern: Type the word, phrase, or regex pattern in the Find field. Matches appear highlighted in yellow in the Live Preview in real time as you type.
Step 3 β€” Set options: Toggle Match Case for case-sensitive search; Whole Word to avoid partial matches; Regex for full regular expression support; Multiline for line-anchored patterns (^ and $).
Step 4 β€” Enter replacement: Type your replacement in the Replace With field. Leave it blank to delete every match. Use $1 , $2 to insert capture group content when Regex is on.
Step 5 β€” Replace: Click Replace All to substitute every match, or Replace Next to step one match at a time. Use the ↑ ↓ navigation buttons to jump between matches.
Step 6 β€” Chain or export: The result appears in the Result panel. Click Use as Input to chain another replacement, or Copy Result to grab the finished text.

Key Features Explained

Case Sensitivity

Toggle Match Case to distinguish between "Hello" and "hello". When off (default), the search is case-insensitive. When on, only exact-case matches are highlighted and replaced. Essential for code identifiers and proper noun replacements.

Whole Word

Searching for "cat" without this option matches "cat", "category", and "concatenate". With Whole Word on, only the standalone word "cat" matches. The tool wraps your pattern in word boundary anchors ( \b ) automatically.

Regex Mode

Enable full regular expression support. Use \d+ for numbers, [A-Z]+ for uppercase sequences, (foo|bar) to match alternatives, or complex patterns like email address validators. Capture groups ( $1 , $2 ) work in the Replace field.

Multi-Rule Batch

Define a numbered list of find→replace pairs and click Apply All to run all rules in one pass. Rules execute sequentially — output of rule 1 feeds into rule 2. Ideal for bulk normalisation, code refactoring, or cleaning exported CSV/TSV data.

Common Use Cases

πŸ“

Document Editing

Quickly correct a misspelled name, update a product name across a long document, or standardise date formats without manually scanning every paragraph.

πŸ’»

Code Refactoring

Rename a variable or function across a code snippet, convert camelCase to snake_case using regex capture groups, or remove debug log statements in bulk.

πŸ“Š

CSV / Data Cleaning

Normalise inconsistent values in exported spreadsheet data β€” replace multiple date formats with one standard, remove unwanted currency symbols, or clean phone number formatting.

🌐

HTML / Markup

Update deprecated HTML attributes, replace old CDN URLs with new ones, or strip specific inline styles from a block of HTML using targeted regex patterns.

πŸ”€

Text Normalisation

Convert all-caps text, remove extra whitespace, normalise punctuation (smart quotes to straight quotes), or standardise spelling variants (colour β†’ color) across large text bodies.

πŸ“§

Email Templates

Replace placeholder tokens ( {{NAME}} , {{COMPANY}} ) with real values, or use multi-rule replace to personalise a template for multiple recipients at once.

Practical Regex Find & Replace Examples

Enable Regex mode and try these real-world patterns. Copy the Find and Replace values directly into the tool.

Task Find Pattern Replace With Notes
Remove blank lines ^\s*\n (empty) Requires Multiline on
Match email addresses \b[\w.+-]+@[\w-]+\.[a-z]{2,}\b [REDACTED] Case-insensitive
Match phone numbers (US) \b\d{3}[-.\s]\d{3}[-.\s]\d{4}\b XXX-XXX-XXXX Matches 555-123-4567
Swap word order (\w+)\s+(\w+) $2 $1 Uses capture groups
Remove HTML tags <[^>]+> (empty) Strips all <tag> blocks
Replace multiple spaces \s{2,} (single space) Collapses whitespace
YYYY-MM-DD β†’ DD/MM/YYYY (\d{4})-(\d{2})-(\d{2}) $3/$2/$1 Reformats dates
Replace all digits \d # Redacts numeric data
Remove line-start spaces ^ + (empty) Requires Multiline on
Match URLs https?://[^\s]+ [URL] Replaces http/https links
Duplicate word removal \b(\w+)\s+\1\b $1 Finds repeated words
Wrap words in quotes (\bfoo\b|\bbar\b) "$1" Quotes specific words

How This Tool Compares to Common Alternatives

A quick feature comparison between this online tool and popular find-replace environments.

Feature This Tool MS Word Google Docs VS Code sed (CLI)
No installation needed βœ“ βœ— βœ“ βœ— βœ—
Regex support βœ“ βœ“ βœ— βœ“ βœ“
Capture group replace ($1) βœ“ βœ“ βœ— βœ“ βœ“
Multi-rule batch replace βœ“ βœ— βœ— βœ— βœ“
Live highlight preview βœ“ βœ“ βœ“ βœ“ βœ—
Works offline / no login βœ“ βœ“ βœ— βœ“ βœ“
Replacement history βœ“ βœ— βœ— βœ— βœ—
Delete all matches βœ“ βœ“ βœ“ βœ“ βœ“

Frequently Asked Questions

What is find and replace?
Find and replace is a fundamental text editing operation that locates all occurrences of a word, phrase, or pattern in a body of text and substitutes them with a different string. It is available in virtually all text editors, word processors (Microsoft Word, Google Docs), code editors (VS Code, Sublime Text), and command-line tools ( sed , awk ). This tool brings that capability to any browser, with no installation required.
How do I use regex in find and replace?
Enable the Regex toggle, then type a regular expression in the Find field. Examples:
  • \d+ β€” matches any sequence of one or more digits
  • [A-Z]+ β€” matches one or more uppercase letters
  • \b\w+@\w+\.\w+\b β€” a basic email address pattern
  • (\w+)\s(\w+) β€” captures two words; use $2 $1 to swap them
In the Replace field, reference capture groups with $1 , $2 , etc.
What does "Whole Word" matching mean?
Whole Word matching restricts the search so it matches only the exact word, not substrings. For example, searching for cat with Whole Word on matches the word "cat" but not "concatenate", "category", or "scatter". Internally, this wraps the pattern in word boundary anchors ( \b...\b ). This is equivalent to the "Whole Word" checkbox in Microsoft Word's Find & Replace dialog.
What is multi-rule replace and when should I use it?
Multi-rule replace lets you define a list of find→replace pairs and apply all of them in one click. Rules run sequentially — the output of rule 1 becomes the input of rule 2. Use it when you need to apply several different substitutions simultaneously, for example: normalising multiple date formats, renaming several variables at once, or cleaning exported data that has multiple inconsistencies.
How do I delete all occurrences of a word?
Type the word or pattern in the Find field, leave the Replace With field completely empty, then click Delete All Matches or Replace All . Every match is removed from the text and the cleaned result appears in the Result panel.
Does this tool support capture groups?
Yes. Enable Regex mode and use parentheses in the Find pattern to define capture groups. Reference them in the Replace field as $1 , $2 , $3 , etc. Example: find (\d{4})-(\d{2})-(\d{2}) and replace with $3/$2/$1 to reformat dates from YYYY-MM-DD to DD/MM/YYYY.
Is my text stored or sent to a server?
No. All processing runs entirely in your browser using JavaScript. Your text is never sent to any server, logged, or stored anywhere. The tool works fully offline once the page has loaded, making it safe for processing sensitive or confidential text.
What is the difference between Replace Next and Replace All?
Replace Next substitutes only the current match and advances to the next, letting you review each replacement individually and skip ones you want to keep. Replace All substitutes every match in the text in a single operation. Use Replace Next for selective replacements and Replace All for bulk substitutions.
What does the Multiline toggle do?
Multiline mode changes how the anchors ^ (start) and $ (end) behave. With Multiline on (default), ^ matches the start of each line and $ matches the end of each line. With it off, ^ and $ match only the very start and very end of the entire text. Use it when you want to match or replace patterns at the beginning or end of specific lines.