Category: Text tools
Find and Replace Text
Replace the first or all literal and JavaScript regex matches
Find and replace literal text or JavaScript regex in pasted content. Control case, whole words, first or all matches, and capture groups with no upload.
The result will appear here.
Whole-word matching uses word boundaries, which do not exist in scripts written without spaces such as Chinese, Japanese and Thai.
Everything on this page is processed in your browser. Nothing is uploaded.
What this tool does
This tool finds literal strings or JavaScript regular-expression matches in one pasted text block and replaces the first or all matches. Match case, use whole-word mode, and reference capture groups such as $1 or $& in regex replacements; invalid patterns produce a readable error. Copy the transformed output and see replacement, character and line counts. It does not read files, folders or projects, support another regex flavor, or provide undo, visual diff, saved history or collaboration. Whole-word mode relies on JavaScript word boundaries and is unreliable for scripts such as Chinese and Japanese. Text and results stay in your browser.
How to use it
- Paste text and enter the find and replacement values.
- Choose literal or regex matching, case, whole word, and first or all.
- Review counts and output, then copy the transformed text.
Privacy
This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.
Frequently asked questions
- How do I find and replace text online?
- Paste text, enter what to find and its replacement, choose matching options, then copy the output.
- Can regex capture groups be used in the replacement?
- Yes. JavaScript regex mode supports replacement references such as $1, $2 and $&.
- Can I replace only whole words or only the first match?
- Yes. Whole word and first-versus-all controls are available, although whole word uses JavaScript boundaries.
- Can it search files or show a diff?
- No. It only processes pasted text and has no file search, visual diff, undo or saved history.
- Is my pasted text uploaded?
- No. Text, patterns and results remain in your browser and are not sent to LocalTools.