Batch find-and-replace on big text — regex, $1 capture groups, whole-word, case toggle, multiple chained rules — runs entirely in your browser
- Runs locally
- Category Text
- Best for Removing repetitive cleanup work from everyday writing and operations.
bar is a placeholder. Replace every bar with bar, and TODO with DONE.
What this tool does
A real batch find-and-replace tool, not a regex playground. Paste a wall of text, define one or more replace rules, and get the rewritten output with a live count of how many substitutions each rule made. Every rule has its own switches: literal vs regex, case-sensitive on/off, whole-word match, replace-all vs replace-first, and an enable toggle so you can mute a rule without deleting it.
The thing that sets this apart from a regex tester is rule chaining. Rules run top to bottom, and each rule operates on the text left by the one above it — so you can normalize curly quotes, then collapse double spaces, then swap a project name, in a single pass. Drag rules up and down with the arrow buttons to change the order; the result updates as you type.
Regex mode supports full JavaScript regular expressions including backreferences in the replacement: write `(\d{4})-(\d{2})-(\d{2})` in Find and `$3/$2/$1` in Replace to flip ISO dates to day/month/year. An invalid pattern shows a clear inline error on just that rule, while the other rules keep working. The result panel highlights every changed span so you can eyeball what moved before copying. Source text and rules sync into a shareable URL; your highlight preference is remembered locally. No upload, no account, no server round-trip.
Tool details
- Input
- Text + Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 10 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Text · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Find and Replace Text fits into your work
Use it to clean, compare, reshape, or extract plain text before it goes into a document, CMS, spreadsheet, or prompt.
Text jobs
- Removing repetitive cleanup work from everyday writing and operations.
- Making text easier to compare, paste, publish, or feed into another tool.
- Working with content locally when the text is private or unfinished.
Text checks
- Scan for unintended whitespace, duplicate lines, and lost punctuation.
- For long text, test the first few lines before applying the whole change.
- Copy the final output only after checking the preview.
Good next steps
These links move the current task into a more complete workflow.
- 1 Regex Tester Test JavaScript regex live — match highlighting, group capture, replace preview, flag toggles — browser-only Open
- 2 Text Deduplicator Remove duplicate lines from any list — case-sensitive optional, whitespace-trim optional, count duplicates — browser-only Open
- 3 Text Diff Compare two blocks of text — line-by-line additions, deletions, equal — colour highlighted, browser-only Open
Real-world use cases
Rename a function across a pasted code block
You pasted a chunk of a file into a chat and need to rename `getUser` to `fetchUser` everywhere before sending it back — but not touch `getUserId`. Add a rule with Find `getUser`, Replace `fetchUser`, turn on Whole word so `getUserId` is left alone, turn on Case sensitive so `GetUser` in a comment isn't swept up. The count tells you how many call sites you touched, and the highlight shows each one so you can confirm you didn't miss a method on a different object.
Normalize messy text before importing to a CMS
A writer hands you a doc full of curly quotes, em dashes typed as `--`, and double spaces after periods. Stack three rules: rule 1 Find `--` Replace `—`, rule 2 Find ` ` (two spaces) Replace ` ` (one space), rule 3 a regex rule Find `“|”` Replace `"`. They run in order in a single pass, and you copy clean text straight into the CMS field. No find-replace-repeat fifteen times in a word processor.
Reformat a column of dates with a capture group
You exported a CSV and the date column is `2024-01-31` but the downstream system wants `31/01/2024`. Turn on Regex, Find `(\d{4})-(\d{2})-(\d{2})`, Replace `$3/$2/$1`. Paste the whole column, hit copy, paste it back. One rule rewrites every row, and the replacement count confirms you caught all of them rather than silently skipping a malformed line.
Swap a brand or project name before a public demo
The slide notes still say the internal codename `Project Falcon` and you're about to screen-share. Find `Project Falcon`, Replace with the public name, leave Case sensitive off so `project falcon` in a lowercased heading is also caught. The shareable URL lets you hand the exact rule set to a teammate so the next deck gets scrubbed identically.
Build a quick template by replacing placeholders
You have a contract template with `{{CLIENT}}`, `{{DATE}}`, and `{{AMOUNT}}` placeholders. Add one rule per token: Find `{{CLIENT}}` Replace `Acme Corp`, and so on. Because the braces are literal with Regex off, you don't have to escape anything. The per-rule counts catch the classic bug of a placeholder you forgot to fill — a zero count means that token never appeared.
Common pitfalls
Forgetting to escape regex metacharacters. With Regex on, a Find of `a.b` matches `axb`, `a8b`, anything — because `.` means any character. If you want a literal dot, turn Regex off (the safest default) or write `a\.b`. The reverse trap: turning Regex on for `(price)` and being surprised the parentheses vanished from the output — they're now a capture group, not literal text.
Getting the rule order backwards. Rules cascade top-to-bottom, so a rule that creates the text another rule consumes must come first. If rule A turns `USD` into `$` and rule B turns `$` into `dollars`, every `USD` becomes `dollars` — probably not what you wanted. Use the up/down arrows and watch the per-rule counts to see which rule is firing on whose output.
Leaving 'Replace all' off and assuming nothing matched. With global off, only the first occurrence is replaced and the count shows 1 even though the word appears ten times. If your count looks suspiciously low, check that Replace all is on for that rule.
Privacy
Every replacement runs as plain JavaScript inside your browser tab — the matching engine is the native RegExp, no library, no network call. Your source text and replacement rules never leave the page and nothing is logged. The one caveat is the Share link button: it encodes the current source text and all rules into the URL query string so a recipient lands on the same setup. That is great for a public snippet but means the destination's access log sees whatever you put in the box — so for confidential text, copy the result manually and skip the share URL.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only
- Age Difference Calculator The exact gap between two birthdays — years/months/days, percentage, and the date one person is twice the other's age — browser-only