Text Replace
Find and replace text or regular expressions — with global and case-insensitive options, 100% in your browser.
Input
Options
What is a find and replace tool?
A find and replace tool searches for a piece of text inside a larger body of text and substitutes it with another piece of text. This is one of the most fundamental text-editing operations, used for everything from renaming a variable in source code to updating a brand name across hundreds of pages of documentation. A good find-and-replace tool supports both plain text matching (where the search string is treated literally) and regular-expression matching (where the search string is a pattern that can match many different strings).
This tool supports both modes. In plain-text mode, every occurrence of the exact "Find" string is replaced with the exact "Replace with" string. In regex mode, the "Find" field is interpreted as a JavaScript regular expression, so you can match patterns like dates, emails, phone numbers or any structured text. You can also choose whether to replace all occurrences (global) or just the first one, and whether the match should ignore letter case.
Plain text vs regular expressions
The choice between plain-text and regex matching determines what you can find and how precise the match is. Plain-text matching is simple and predictable: it finds the exact characters you typed and replaces them. Regular expressions are far more powerful — they let you describe a pattern rather than a fixed string, so a single replacement can update many different but similar pieces of text at once.
For example, in plain-text mode, finding "color" replaces only the literal word "color". In regex mode, the pattern colou?r matches both "color" and "colour", and the pattern \d{4}-\d{2}-\d{2} matches any date in YYYY-MM-DD format. The table below compares the two approaches:
| Aspect | Plain text | Regular expression |
|---|---|---|
| What it matches | The exact characters you type | A pattern that describes many strings |
| Learning curve | None | Requires regex syntax knowledge |
| Best for | Simple literal replacements | Patterns like dates, emails, numbers |
| Capture groups in replacement | Not supported | Supported ($1, $2, ...) |
| Risk of unexpected matches | Low | Higher — test before applying |
When to use find and replace
There are many practical situations where find and replace is essential. The most common ones include:
- Renaming identifiers in code. Rename a variable, function or class across an entire file or project.
- Updating brand or product names. Replace an old company name, slogan or product code with the new one across documentation.
- Normalising data formats. Use regex to convert dates, phone numbers or currency from one format to another in bulk.
- Removing unwanted text. Find a pattern such as tracking parameters in URLs and replace it with nothing to clean up links.
- Template filling. Replace placeholders like
{{name}}or%swith real values when preparing messages or documents. - Redacting sensitive data. Replace emails, phone numbers or ID numbers with masked versions for privacy-safe sharing.
Whenever you need to change many occurrences of something at once, find and replace is the right tool.
How to find and replace text
Using this tool takes only a second and happens entirely in your browser. No upload, no sign-up, no installation. Follow these three steps:
- Paste your text. Click inside the input box on the left and paste the text you want to modify.
- Fill in Find and Replace. Type the text or pattern to find in the "Find" field and the replacement text in "Replace with". Pick the options: regex, global, ignore case.
- Replace and copy. Click "Replace" to produce the updated output, then click "Copy" to copy it. A small notice tells you how many replacements were made.
Because every operation is computed locally with JavaScript on your own device, your text never leaves your browser. This makes the tool completely private and suitable for confidential code, contracts and customer data.
Tips for safe replacements
Before running a large replacement, test it on a small sample to make sure the result is what you expect. This is especially important with regular expressions, where a too-loose pattern can match far more than intended. When using regex, take advantage of capture groups to preserve parts of the original text: for example, finding (\d{4})-(\d{2})-(\d{2}) and replacing with $3/$2/$1 converts YYYY-MM-DD to DD/MM/YYYY while keeping the actual numbers intact.
If you only want to replace the first occurrence, turn off "Replace all occurrences". If you want to merge different casings of the same word, turn on "Ignore case". For replacements that should delete text rather than substitute it, leave the "Replace with" field empty. Combine find and replace with the text trimmer and duplicate line remover on this site for a complete text-cleaning workflow.
Is this find and replace tool free?
Yes, completely free with no sign-up, no watermarks and no limits beyond your device's memory.
What regex flavour does it use?
JavaScript regular expressions, as supported natively by your browser. Capture groups in the replacement use the $1, $2 syntax.
What does "global" do?
When enabled (default), every occurrence is replaced. When disabled, only the first occurrence is replaced.
Is my text uploaded?
No. All replacement is local. Your text never leaves your browser, so it is safe to paste confidential code and contracts.