Find and Replace Text Online
Search and replace across a whole block of text in your browser, with regex, case, and whole-word controls. Your text stays on your device.
Find and Replace Text runs entirely in your browser. The text you paste, the search and replacement values, and the result never leave your device and are not uploaded to ArrayKit.
Open the Regex Tester
About Find and Replace Text
Find and Replace Text lets you swap one string for another across an entire block of text at once. Type what to find and what to replace it with, then tune the match: turn on regex to match patterns and reuse captured groups with $1 and $2 backreferences, toggle case sensitivity, restrict matches to whole words, or switch between replacing every match and just the first. The tool shows exactly how many matches were replaced and gives you a copyable, downloadable result. It is handy for cleaning up pasted logs, renaming variables across a snippet, reformatting dates, or bulk-editing lists and CSV rows. Everything runs on your device — the text you paste is processed in the browser and never leaves it.
Features
- Replace every match at once or only the first occurrence
- Live match count so you know how many replacements were made
- Regex mode with $1 and $2 backreferences in the replacement
- Case-sensitive and case-insensitive matching with one toggle
- Whole-word matching that respects word boundaries
- Clear inline error when a regular expression is invalid
- Copy or download the replaced text in one click
- Runs on your device with no text uploaded anywhere
How to use the Find and Replace Text
- Paste your text into the input area
- Type the text or regex to find and the replacement
- Toggle regex, case-sensitive, whole-word, or first-only as needed
- Read the match count, then copy or download the result
Example
Input
find: (\w+)@(\w+)
replace: $2 at $1
text: user@example
Output
example at user
Regex capture groups let $1 and $2 swap the two halves of a match.
Common errors & troubleshooting
- The replacement shows a literal $1 instead of the captured text. — Backreferences like $1 only work when Regex mode is on. Turn on Regex and make sure your find pattern actually has a group in parentheses.
- Nothing is replaced even though the text is clearly there. — Check the Case-sensitive toggle. With it on, 'Cat' and 'cat' are different; turn it off to match regardless of case.
- A find like cat also changes 'category' and 'scatter'. — Turn on Whole word so cat only matches the standalone word and not substrings inside longer words.
- Regex mode shows an 'Invalid regular expression' error. — You likely have an unbalanced ( ) or [ ]. Fix the bracket, or switch off Regex to search for the characters literally.
Frequently asked questions
- How do I use capture groups when I find and replace with regex?
- Turn on Regex mode and wrap parts of your find pattern in parentheses, then reference them in the replacement as $1, $2, and so on. For example, find (\w+) (\w+) and replace with $2 $1 swaps two words.
- Can I replace only the first match instead of all of them?
- Yes. Switch the scope from 'Replace all' to 'First only' and just the first match is replaced. The match count still shows how many candidates were found in that pass.
- What does the whole-word option do here?
- Whole word wraps your search in word boundaries, so finding 'cat' matches the standalone word 'cat' but leaves 'category' and 'scatter' untouched. It works in both plain and regex modes.
- Does this find and replace tool treat my search as a regex by default?
- No. By default your find text is matched literally, so characters like . ( and $ mean themselves. Turn on Regex mode only when you want pattern matching and backreferences.
- Is the text I paste into Find and Replace uploaded anywhere?
- No. The find-and-replace runs entirely in your browser. The text you paste, your search, and the result stay on your device and are never sent to ArrayKit.
- What happens if my regular expression is invalid?
- The tool catches the error and shows an 'Invalid regular expression' message instead of changing your text, so you can fix the pattern before anything is replaced.
Related tools
- Regex Tester — Test regular expressions live with matches, groups and flags.
- Text Diff — Compare two texts line-by-line and see additions and removals.
- Case Converter — Convert text between camelCase, snake_case, kebab-case, PascalCase and more.
- Remove Duplicate Lines — Remove duplicate lines from a list, with case, trim, keep-first-or-last and sort options.
- Sort Text Lines — Sort lines alphabetically, numerically, by length or randomly, with reverse, case and dedupe options.
- Word & Character Counter — Count words, characters, sentences, lines, bytes and approximate tokens, live.
All ArrayKit tools