✎ TEXT · UTILITY

Find & Replace

Replace every occurrence of a word, phrase or pattern in your text — live, with a match count. Match case or whole words, use regular expressions with capture groups, and type \n to find or insert line breaks.

Plain text or regex · Capture groups $1 · \n and \t escapes
Regex runs in a background thread with a time limit, so a bad pattern can never freeze the page.Want to test a pattern step by step? Regex Tester →
Input text Any text
Result
Matches: –
Lines affected: –
Characters: –
Time: –
Regex-safe · 100% Client-Side
◆ ABOUT THIS TOOL

Find and Replace, Without the Surprises

Plain-text mode replaces exactly what you type — no special characters to escape. Regex mode gives you the full power of JavaScript regular expressions.

In the default plain text mode, characters like . * ? ( ) $ are matched literally and the replacement is inserted exactly as typed. Match case and Whole words narrow the search; whole-word matching is Unicode-aware, so it works for accented and non-Latin words too.

Need line breaks? With \n \t escapes on, type \n in either field for a newline and \t for a tab — for example replace , with \n to turn a comma-separated list into one item per line. Type \\ for a literal backslash.

Tick Regular expression to search with a pattern. The replacement supports $1…$99 for capture groups, $<name> for named groups, $& for the whole match and $$ for a literal dollar sign.

Patterns run in a background thread with a time limit. A pattern with catastrophic backtracking — such as (a+)+$ — is stopped after a couple of seconds with a clear message instead of freezing your browser tab.

⌕ REGEX CHEAT SHEET

Useful Patterns

Tick “Regular expression”, then try one of these.

^

Prefix every line

Find ^, replace with - to turn lines into a bullet list. $ appends to every line instead.

()

Swap with groups

Find (\w+), (\w+), replace with $2 $1: “Lovelace, Ada” → “Ada Lovelace”.

\s

Collapse spaces

Find [ \t]{2,}, replace with a single space. Find \s+$ with nothing to strip trailing whitespace.

\d

Reformat dates

Find (\d{4})-(\d{2})-(\d{2}), replace with $3/$2/$1: 2026-10-07 → 07/10/2026.

◐ THREE STEPS

How to Use the Find & Replace

Get your result in under ten seconds.

1

Paste your text

Or open/drop a text file into the input.

2

Type what to find and the replacement

Matches are counted and replaced live as you type. Leave Replace empty to delete matches.

3

Copy or download

Copy the result, download it, or press “Use as input” to chain another replacement.

✓ FEATURES

Why Use the Find & Replace on Developers Web Tools

Fast, accurate and private — built for developers.

👁

Live preview

See the result and the number of matches as you type.

🎯

Precise matching

Match case and Unicode-aware whole-word matching.

⌕

Full regex support

Capture groups, named groups, lookarounds and per-line ^ $ anchors.

↵

Line breaks made easy

Use \n and \t in both fields — split or join lines in one step.

🛡

Freeze-proof

Regex runs in a worker with a time limit; runaway patterns are stopped.

🔒

Private

Your text and patterns stay in your browser.

FAQ

Frequently Asked Questions

Keep \n \t escapes ticked and type \n in the Find field. Replace it with , to join lines, or do the reverse to split a list into lines. In regex mode you can also use \n or \s directly in the pattern.

In regex mode, parts of the pattern in parentheses are numbered from 1. Use $1, $2… in the replacement to insert them, $<name> for named groups like (?<year>\d{4}), and $& for the whole match. In plain mode, $ is just a dollar sign.

It only matches the search term when it is not part of a longer word — “cat” matches “the cat sat” but not “concatenate”. Letters, digits and underscores in any language count as word characters.

Some patterns take exponential time on certain input (catastrophic backtracking), for example nested quantifiers like (a+)+ or (.*)*. To keep your browser responsive, regex searches have a time limit (2 seconds, a little longer for very large text). Simplify the pattern, for example by removing nested quantifiers.

JavaScript (ECMAScript) regular expressions, the same as in browsers and Node.js — including lookbehind, named groups and Unicode property escapes. The g flag is added automatically (unless First match only is ticked), i follows Match case and m follows “^ $ match each line”.

Your input is never modified — the result appears in the right-hand box. Press Use as input only when you want to apply another replacement on top of it.

No. Searching and replacing happen locally in your browser.