←
Text

Find and Replace

Loading the tool…

Ready when you are.Runs in this browser · nothing is uploaded

Replace text, with regex support

  • Free
  • No sign-up
  • No upload
  • Works offline

Tool facts

Opens
TXTMDCSVHTMLCSSJSJSON
Saves as
TXTMDCSVHTMLCSSJSJSON
Price
Free, no sign-up, no watermark
Are files uploaded?
No. Everything is processed in this browser, on your device.
Batch processing
One file at a time
Offline use
Works without a connection once this page has loaded
Browser
A recent Chrome, Edge, Firefox or Safari, on computer or phone.

Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.

About Find and Replace

Find and Replace swaps every occurrence of a word, phrase or pattern in a text with something else and shows you exactly what will change. Type what to find and what to replace it with: the number of matches, a preview with each match highlighted and the finished text all update as you type. It works on any amount of pasted text or on a file you open, such as a .txt, .csv, .html or .md file.

Match case makes the search case-sensitive, and Whole words only skips matches inside longer words, so replacing "cat" leaves "category" alone; it also works for accented and non-Latin words. For advanced edits, turn on Regular expression to use JavaScript regex syntax with capture groups: $1, $2 or $<name> in the replacement insert the captured text, and $& inserts the whole match. Typing \n or \t in the replacement inserts a line break or a tab, which lets you split or join lines.

Find and Replace runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.

How to use Find and Replace

  1. Paste your text into the Input box, or click Open file.
  2. Type the text to search for in Find and the new text in Replace with. Leave Replace with empty to delete the matches.
  3. Turn on Match case, Whole words only or Regular expression if needed, and check the highlighted Matches preview.
  4. Copy or download the result from the Output box.

Frequently asked questions

How do I use capture groups in the replacement?

Turn on Regular expression and put parentheses around the parts you want to keep. For example, find (\w+)@(\w+)\.com and replace with $2: $1 to turn "anna@example.com" into "example: anna". Use $<name> for named groups like (?<year>\d{4}), and $$ for a literal dollar sign.

How do I replace line breaks?

Turn on Regular expression and search for \n to match each line break, or \n{2,} for blank lines. In the replacement, \n inserts a line break and \t a tab, as long as Interpret \n and \t is on. For example, replacing \n with ", " joins all lines into one comma-separated line.

Why does my regular expression show an error?

Patterns run in JavaScript's Unicode mode (the u flag), which is stricter than some other regex flavors: unnecessary escapes such as \- or \: outside a character class are not allowed, and lookbehind must be valid. The status bar shows the browser's error message so you can see which part is wrong.

What does Whole words only do with other languages?

A match counts as a whole word when the characters on both sides are not letters, digits or underscores in any script. This works for accented Latin, Cyrillic, Greek and similar scripts. Chinese and Japanese have no spaces between words, so whole-word matching is not meaningful there; leave it off.

Is the text uploaded?

No. Searching and replacing run in your browser, so your documents and code stay on your device.

· Free · Runs in this browser · nothing is uploaded

Drop any file here
Drop it to see which tools can open it