How to replace text
- Add your text. Paste it, type it, open a file or drop one onto the left box. Nothing is uploaded.
- Write a rule. Type what to find and what to put in its place. Matches light up in your text straight away, and the counter shows how many there are.
- Fine-tune it. Use
Aato match case,abfor whole words,.*for regex and Keep case to preserve capitals. Add more rules if you need them. - Check and copy. The Changes tab shows removed text struck through and new text in green. Then copy the result, download it, or use it as your new input and keep going.
Why use this replace tool
Many rules at once
Run a whole list of replacements in one pass instead of one find at a time. Paste dozens of pairs from a spreadsheet with Bulk import.
Real regex support
Capture groups, named groups, look-arounds, Unicode letters and case conversion with \U and \L. Errors are explained right under the rule.
See before you copy
Matches are highlighted live in your text, each rule has its own colour and counter, and the Changes view shows exactly what was replaced.
Keep case
Replace a word and keep how it was written: lower case, Title case or ALL CAPS, from a single rule.
Private by design
Everything runs in your browser. Your text never leaves your device, and share links contain only your rules.
Built for big files
Megabytes of text are handled in a background thread, and runaway patterns are stopped before they can freeze the page.
Examples
Swap "Last, First" into "First Last"
- Find
^([^,\n]+),\s*(.+)$- Replace
$2 $1- Options
- Regex
Lovelace, Ada Hopper, Grace
Ada Lovelace Grace Hopper
Turn a list into one comma-separated line
- Find
\n- Replace
,- Options
- Regex
apples pears plums
apples, pears, plums
Rename a word but keep its capitals
- Find
colour- Replace
color- Options
- Whole words, Keep case
Colour chart. COLOUR codes. colourful
Color chart. COLOR codes. colourful
Reformat dates from 2026-11-19 to 19/11/2026
- Find
(\d{4})-(\d{2})-(\d{2})- Replace
$3/$2/$1- Options
- Regex
Due 2026-11-19, paid 2026-12-01
Due 19/11/2026, paid 01/12/2026
You will find these and other common jobs, such as removing blank lines, trimming trailing spaces or stripping HTML tags, under Presets in the tool.
Regex cheat sheet
Turn on .* for a rule to search with a regular expression. Patterns follow the JavaScript flavour, with ^ and $ matching at the start and end of every line.
| Pattern | Matches |
|---|---|
. | Any single character except a line break |
\d \w \s | A digit, a word character (letter, digit, _), a space or tab |
\D \W \S | The opposite of each of the above |
[abc] [^abc] | One of a, b or c / anything except those |
a* a+ a? | Zero or more, one or more, zero or one |
a{3} a{2,5} | Exactly 3, or between 2 and 5 |
^ $ | Start and end of a line |
\b | A word boundary |
(abc) | Capture a group to reuse as $1 |
(?<name>abc) | Capture a named group to reuse as $<name> |
a|b | Either a or b |
\. \( \\ | A literal dot, bracket or backslash |
| Token | Inserts |
|---|---|
$1 … $99 | Text captured by group 1 to 99 |
$<name> | Text captured by a named group |
$& | The whole match |
$$ | A literal dollar sign |
\n \t | A line break / a tab |
\U … \E | Upper-case everything until \E |
\L … \E | Lower-case everything until \E |
\u \l | Upper- or lower-case only the next letter |
Frequently asked questions
How do I replace a word everywhere in my text?
Paste your text, type the word in Find and its replacement in Replace with. Every match is replaced at once, and the counter beside the rule tells you how many changes were made. Turn on Whole words so that replacing "cat" leaves "category" alone.
Can I do several find and replace jobs in one go?
Yes. Add as many rules as you like with + Add rule, or paste a whole list with Bulk import. Rules run from top to bottom, so a later rule sees the result of the earlier ones. Use the ↑ button to change the order and the switch on each rule to turn it off without deleting it.
How do I delete text instead of replacing it?
Leave Replace with empty. Every match is removed. To delete whole lines that contain something, turn on regex and find ^.*something.*\n with an empty replacement.
How do I replace line breaks or tabs?
Turn on regex for the rule and use \n for a line break or \t for a tab in the Find box, for example \n replaced with ", " joins lines into a comma-separated list. To put a line break into the replacement without regex, tick the option under the rules to read \n and \t as a new line and a tab.
What are capture groups and how do I use them?
Brackets in a regex pattern capture part of the match. You can reuse each part in the replacement as $1, $2 and so on, or by name with (?<name>…) and $<name>. For example (\w+)@(\w+) replaced with $2 at $1 turns "sam@example" into "example at sam".
Can I change upper and lower case while replacing?
Yes, in two ways. Keep case copies the case of each match onto the replacement, so cat to dog gives dog, Dog and DOG. With regex you can also use \U to make what follows upper case, \L for lower case, \E to stop, and \u or \l for just the next letter.
Is my text uploaded anywhere?
No. All of the matching and replacing happens in your browser, on your device. Your text is never sent to a server, which also means the tool keeps working if you go offline after the page has loaded. Only your rules are remembered on this device so they are there next time.
How much text can it handle?
Many megabytes. The work runs in a background thread so the page stays responsive, and a pattern that takes too long is stopped automatically instead of freezing your browser. For very long text the coloured highlights pause, but replacing and the counts still work.
Last updated