Bulk Find and Replace
Replace a word, a pattern or a symbol everywhere in a block of text — plain text and regular expression modes
Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.
Did this tool do the job?
Thanks, your feedback came through.
How it works
Paste the text into the left box, type what to find and what to replace it with; the result appears on the right as you type and the status line reports how many replacements were made. Plain text mode is the safe one: every character you type means itself, so typing 'Invoice no.' searches for a real full stop at the end — in many tools that dot means 'any character' and quietly rewrites the wrong lines. Switch to regular expression mode only when you genuinely need a pattern: '\d{4}-\d{3}' finds every invoice number of the form 2026-001, and parts you wrap in parentheses can be written back into the replacement with $1 and $2. With the pattern '(\d{4})-(\d{3})' and the replacement '$2/$1', the number 2026-001 becomes 001/2026. A malformed pattern does not crash the page; the reason is spelled out in plain language. If you only want the first occurrence on each line changed, set the scope to 'First match on each line'. Because everything runs inside your browser, input is capped at 1 MB; split larger files and run them one after another.
This tool is also known as find and replace online, bulk text replace, replace word in text, regex replace online, search and replace tool, regular expression replace.
What is Regular expression (regex)?
A regular expression describes the shape of what you are looking for instead of spelling it out. Rather than typing '2026-001' you type '\d{4}-\d{3}', and every number built from four digits, a hyphen and three digits is found. The vocabulary is small: a dot stands for any character, a plus for 'at least one repeat', a star for 'zero or more', square brackets for a set of characters, and curly braces for an exact count. Its power and its risk come from the same place — one mistyped character turns the pattern into something else entirely, which is why it pays to read the match count before accepting the result.
What is Escape character?
An escape character switches off the special meaning of a symbol so it is read as an ordinary character; in regular expressions that is the backslash. A dot means 'any character', so a literal dot has to be written '\.'. In the same way '\$' finds a dollar sign, '\(' an opening parenthesis, and '\\' the backslash itself. This tool does the escaping for you in plain text mode: every character you type is reduced to its literal meaning. In the replacement field it is the dollar sign that is special, and it is escaped by doubling it ($$).
What is Capture group?
A capture group is a part of a regular expression placed in parentheses and stored separately from the rest of the match. The pattern '(\d{4})-(\d{3})' finds an invoice number and puts the year in group one and the sequence number in group two. In the replacement those parts are recalled as $1 and $2, which lets you keep a portion of what was found and rearrange the rest — turning 12/03/2026 into 2026-03-12 is the classic example. Groups are numbered by the order of their opening parentheses, and that rule holds for nested groups too.
How does find and replace differ from comparing, sorting and case tools?
Four text tools sit next to each other here and mixing them up wastes time on the wrong page. Text Compare puts two versions side by side and shows what differs — it changes nothing, the output is a report. Sort Lines moves lines around without touching their content. The Case Converter changes the case of letters, not the words. Find and Replace is the only one that rewrites the text itself: you say what becomes what, and every match is replaced. Clean Up Text also rewrites, but its rules are fixed and it only looks at the shape of the text; here you write the rule.
Why plain text mode exists: the dot, star and dollar trap
In the language of search patterns a few characters carry special meaning: a dot means 'any character', a star means 'zero or more of the previous one', a plus means 'at least one', a question mark means 'optional', and square brackets mean 'one of these'. In plain text mode this tool escapes all of them, so typing 'a.b' really does search for a-dot-b and leaves 'axb' alone. The same protection applies to the replacement: if you type '$1' or '$&' they are written out literally instead of being read as instructions.
This distinction is where text is most often corrupted silently. Searching for '1.250,00' with the dot treated as special would also match '1a250,00' and '1x250,00', and nobody would notice until the document was already out of the door. When you do need pattern matching, regular expression mode is one click away.
Five patterns that cover most real jobs
In regular expression mode the pattern is read with JavaScript rules. Backslash shortcuts define character classes, curly braces a repeat count, and parentheses a capture group. If the pattern is invalid the result panel explains why and your text is left untouched.
- \d — a digit; \d{4} exactly four digits, such as a year
- \s+ — one or more whitespace characters, for collapsing runs of spaces
- ^ and $ — start and end of the text (not of each line)
- (...) — a capture group, written back as $1, $2 in the replacement
- \$ — a literal dollar sign; the escape turns off the special meaning
Frequently asked questions
Can I search for characters like a dot or a star?
Yes. In plain text mode those characters have no special meaning: a dot finds a dot, a star finds a star. The escaping is done for you. Only in regular expression mode do you need to put a backslash in front of them.
How do capture groups ($1, $2) work?
In regex mode the parts you wrap in parentheses are numbered from left to right: the first is $1, the second $2. With the pattern '(\d{4})-(\d{3})' and the replacement '$2/$1', 2026-001 becomes 001/2026. To output a literal dollar sign, write $$.
What happens if my pattern is invalid?
Nothing is replaced and the page does not break. The result panel names the cause — an unclosed parenthesis, a star with nothing in front of it — so you can correct the pattern. If you were after literal text, switching Matching to 'Plain text' also solves it.
How much text can it handle?
Up to 1 MB, that is 1,048,576 characters. The limit is deliberate: some regular expressions slow down exponentially on large inputs and lock up the tab. Split larger files and run them in turn.
Is my text sent anywhere?
No. Searching and replacing run entirely inside your browser; the text never leaves this page and is not sent to any server or third party.