Công Cụ Nhanh

Find and replace text online, many pairs at once

Find / replace pairs
Options

Matches of the first pair

Enter text and a search term to see matches highlighted.

Processed in your browser. Your files and data are never uploaded to a server.

Quick answer

Paste your text, type what to find and what to replace it with; the tool counts and highlights every match and shows the result instantly. Run several pairs in one go, match case, match whole words, ignore Vietnamese accents (“Ha Noi” matches “Hà Nội”) or use regular expressions with $1, $2. Press “Apply” to write the result back, “Undo” to step back.

When to use find and replace

Renaming a company throughout a template contract, fixing a misspelt name across a list, removing stray spaces before commas, turning 2026-10-21 into 21/10/2026: all of it is find and replace. Editors have the feature, but usually one pair at a time and without accent-insensitive matching. This tool runs in your browser; your text is never uploaded.

Illustration of a magnifying glass over lines of text, with one highlighted line swapped via a curved double arrow

How to use it

  1. 1

    Paste your text into the “Text” box.

  2. 2

    Type the text to find and its replacement. Press “Add pair” for more; pairs run top to bottom.

  3. 3

    Choose options: match case, whole words, ignore accents or regex. Match counts appear inside each Find box and matches of the first pair are highlighted.

  4. 4

    Copy the result, or press “Apply to text” to keep editing the new version; “Undo” restores the previous one.

What each option does (finding “an” in “An ăn ban an toàn”)

OptionMatchesCount
DefaultAn, b·an, an3
Match caseb·an, an2
Whole words onlyAn, an2
Ignore accentsAn, ăn, b·an, an, to·àn5

Handy regex patterns

TaskFindReplace with
Collapse repeated spaces {2,}(a single space)
Remove spaces before punctuation\s+([,.;:!?])$1
2026-10-21 to 21/10/2026(\d{4})-(\d{2})-(\d{2})$3/$2/$1
10/21/2026 to 2026-10-21(\d{1,2})/(\d{1,2})/(\d{4})$3-$1-$2
Strip leading “1. ” numbering^\d+\.\s*(empty)

Examples

Renaming parties in a template

Pair 1: “Acme Ltd” → “Northwind Inc.”; pair 2: “Mr Smith” → “Ms Jones”. One pass, with a count of every change.

Fixing Vietnamese place names

Turn on “Ignore accents”, find “Ha Noi”, replace with “Hà Nội”: it matches “Ha Noi”, “Hà Nội” and “HA NOI”.

Reformatting dates

With regex on, find (\d{4})-(\d{2})-(\d{2}) and replace with $3/$2/$1: “2026-10-21” becomes “21/10/2026”.

Deleting a word

Leave “Replace with” empty and every match is removed.

Common mistakes

Replacing “cat” also changes “category”.
Turn on “Whole words only”. Accented letters count as letters, so Vietnamese words are handled too.
Dots and brackets match the wrong things in regex.
In regex, . ( ) [ ] + * ? are special; escape them with \ or turn regex off.
“The regular expression ran too long”.
Nested repeats such as (a+)+ or (.*)* can take forever. The tool stops after 2 seconds so the page stays responsive; make the pattern more specific.
A later pair changes text an earlier pair just inserted.
Pairs run in order on the previous result. Reorder them if needed.

How accent-insensitive matching works

Both the text and the search term are stripped of accents (đ becomes d) for comparison while every character keeps its position, so the original accented text is what gets replaced. Text is also normalised to precomposed Unicode first, so words typed with different keyboards still match.

Regular expressions

Patterns use JavaScript syntax in Unicode mode: \d is a digit, \s whitespace, \p{L} any letter including accented ones. ^ and $ match the start and end of each line. In “Replace with”, $1, $2… insert captured groups and $& inserts the whole match.

Regex runs in a separate Web Worker with a 2-second limit, so a bad pattern cannot freeze the page.

Glossary

Match
A piece of the text equal to the search term.
Whole word
A match with no letter or digit directly before or after it.
Regex
A regular expression: a pattern describing text, e.g. \d+ for a run of digits.
Group ($1)
A bracketed part of a regex, reinserted with $1, $2…

Frequently asked questions

Can I replace several different words at once?

Yes, up to 20 pairs, applied top to bottom.

How do I delete a word?

Type it in Find and leave “Replace with” empty.

Does it keep Word formatting?

No, it works on plain text. For long formatted documents, use Ctrl+H in Word.

Is my text uploaded?

No, everything runs in your browser.

How many steps can I undo?

The last 20 “Apply” steps.

How do I match a line break?

Turn on regex and use \n for a new line or \t for a tab.

Ratings and comments

Loading…