Find and replace in any text

Paste a text, type what to find and what to put in its place, and every one is replaced at once, in your browser: nothing you type is uploaded.

  • Nothing uploaded
  • As you type
  • Any language
  • Free, no sign-up

Getting ready…

Quick facts from our tests

Check it yourself: once the page has loaded, turn off Wi-Fi and mobile data, and Find and Replace still works. Your browser's network panel (F12 on a computer) lists every request the page makes: you'll see Google's ad requests, and none of them carries your text. Our code never gives your text to the ad code. How we prove it

How to find and replace text

  1. Paste the text

    Or open a text file.

  2. Type what to find

    And what to replace it with.

  3. Copy the result

    Or download it.

When this tool isn't the right fit

  • You want to choose which matches to change, one by one. This tool replaces every match at once. Use your editor's find and replace for one-at-a-time changes.
  • You need to change Word or PDF files themselves. It works on text only. Copy the text out, change it here, and paste it back; the file's formatting is not kept.
  • Your pattern uses ^ or $ for the start or end of each line. Here they mean the start and end of the whole text. Use (^|\n) and $1, as the ready-made patterns show.

Why use PDFGuild's find and replace tool

More free tools

Private like this one: nothing you type or add leaves your device.

Find and Replace: the complete guide

Plain words, whole words and capitals, new lines and tabs, regular expressions with examples, real results and tips.

In this guide
  1. What it does
  2. Step by step
  3. How it finds and replaces
  4. Real results
  5. New lines and tabs
  6. Regular expressions
  7. Ready-made patterns
  8. Opening a file
  9. Privacy
  10. Long texts
  11. Tips
  12. Limits
  13. Terms explained

What Find and Replace does, and when you need it

Find and Replace changes every place a word or a phrase appears in a text, at once. Type what to find and what to put in its place, and the changed text appears in the second box, ready to copy or download, with a line that says how many replacements were made. Leave Replace with empty to delete what you find. The box with your own text is never changed, so you can try again.

Three tick boxes decide what counts as a match: Match capital letters, Whole words only, and Use a regular expression, a small pattern language for finding things like phone numbers or dates. Typing \n in a box stands for a new line, so you can also split a list into lines or join lines into one. It runs in your browser: your text is never uploaded and never saved, so closing the page forgets it.

Some jobs it is made for:

  • A name or a date changed throughout a letter, an application or a template.
  • A word spelled two ways, such as colour and color, made the same.
  • A list separated by commas put one item to a line, or the other way round.
  • Unwanted words or symbols deleted everywhere, such as Rs. replaced with ₹.
  • Numbers reformatted, such as phone numbers split into two groups of five, with a regular expression.

Step by step: replacing words

It takes a few seconds, and the same steps work on a phone and on a computer:

  1. Put your text in the top box. Paste it with the Paste button, with Ctrl+V, or by pressing and holding in the box on a phone. You can also type it, choose Open a text file, or drop a text file anywhere on the page.
  2. Type what to find in Find. The page waits for it: until Find has something in it, the note says "Type what to find."
  3. Type the new words in Replace with, or leave it empty to delete every match.
  4. Tick the boxes you need. All three are off at first: capital letters don't matter, a match can be part of a longer word, and what you type is plain text.
  5. Read the line under the result, for example "2 replacements made." or "Not found in the text."
  6. Copy or download the result.

Press Try a sample: the box fills with The form is due on Friday. Send the form to the office by Friday evening., Find gets Friday and Replace with gets Monday. The result says Monday twice, and the page says 2 replacements made.

How it finds and replaces, exactly

The tool looks through the whole text from the start and replaces every match, not only the first. The rules are written here in full, and the same rules are checked by our tests.

PartThe ruleExample
Every matchAll the places the words appear are replaced, and countedThe sample: 2 replacements made
Capital lettersOff at first: capitals don't matter, accented letters included. Tick Match capital letters to change only the exact formcat finds Cat, cat and CAT; école finds ÉCOLE
Part of a wordOff at first, a match can be inside a longer word. Tick Whole words only to match only a word on its owncat to dog: category becomes dogegory, unless Whole words only is ticked
A whole wordThe match must not have a letter, a digit or an underscore of any script right before or after itभारत in भारत, भारत महान is found twice
Plain textWithout Use a regular expression, every character means itself, dots and brackets included. in a.b.c finds the 2 dots
New line and tab\n typed in Find or Replace with stands for a line break, \t for a tab and \\ for one backslashFind , , replace with \n: one item a line
DeleteWith Replace with empty, every match is taken out these deleted from remove these words please
Nothing foundThe text stays as it was, and the note says "Not found in the text."A spelling that doesn't appear

Matches don't overlap: once a part of the text is replaced, the search goes on after it. What you put in is never searched again, so replacing a with aa doubles each a once, and does not run on for ever.

Real results from our tests

We tested Find and Replace with headless Chromium 148, the open-source browser Chrome is built on, on a Windows laptop with an Intel Core i7-1185G7 and 32 GB of memory, on 1 November 2026. Other work was running on the laptop at the same time, so times vary from run to run: each time below is the middle one of 3 runs.

Replacing is quick. It took 3 milliseconds or less to replace a short word everywhere in 500,000 characters of English, Hindi or a mix of English, Hindi, Tamil and emoji, matching whole words only, the most the page takes at once.

After a text is put in the box, the page waits 0.15 second before it works, so a burst of typing is worked on once, and 0.4 second when the text has more than 400,000 characters. So the result of 500,000 characters of English showed between 0.50 and 0.52 second after it was put in the box in our test. A result of more than 100,000 characters shows only its first 100,000 in the box, and says so, because showing a very long text is slow for the browser; Copy and Download take all of it.

Checked by our tests. Every example on this page is one of our tests, run on the page's own code. They cover capitals with the box on and off, whole words in English and Hindi, special characters as plain text, groups put back with $1 to $3, \n and \t typed in both boxes, a bracket left open, and taking the numbers off a numbered list.

Size and offline. On a first visit the page downloads about 0.1 MB for the tool: the page, its styles, its scripts and the fonts, with Google's ad code not counted. In our test we switched the network off after the page had loaded and pressed Try a sample: the result showed 0.2 seconds later or less in each of 15 runs.

Phone-sized screen. We also ran the tests on a phone-sized screen in headless Chromium (390 × 844 pixels, with touch). That is not a real phone. Every button, box and tick box was 44 pixels high or more, and the page did not scroll sideways. These tests don't cover Safari or Firefox.

Try it yourself: press "Try a sample" at the top of this page. It puts a sentence with Friday twice in the box, with Friday in Find and Monday in Replace with. The result says Monday twice, and the page says 2 replacements made. Then tick Match capital letters and type friday in Find: the page says Not found in the text.

Try the sample

New lines and tabs: splitting and joining lines

The two boxes are one line each, so a line break can't be typed into them. Instead, type a backslash and an n, \n, and the tool reads it as a line break; \t is a tab. To find a real backslash followed by n, type two backslashes: \\n.

  • A comma list to one item a line: find , (a comma and a space) and replace with \n. red, green, blue becomes three lines: red, green and blue.
  • Lines to a comma list: find \n and replace with , . Two lines a and b become a, b. Remove Line Breaks does this too, and can keep paragraphs apart.
  • Spaces to tabs, for a spreadsheet: find a space and replace with \t, then paste the result into a sheet.

Once the items are on their own lines, Sort Lines can put them in order, Remove Duplicate Lines can take out the repeats, and Reverse Text can put them last line first.

Find and Replace Text after its sample: Friday replaced by Monday in the sample sentence, with 2 replacements made
Our sample sentence, changed in the browser.

Regular expressions, in plain words

Tick Use a regular expression and Find reads a pattern instead of plain words. The patterns are JavaScript's, the same as many programs use. A few pieces cover most needs:

  • . means any one character, so . in a.b.c now matches all 5 characters.
  • \d is a digit from 0 to 9 (not Hindi digits), and \d{5} is five of them.
  • \s is a space, a tab or a line break; \s? means one or none.
  • ? makes the character before it optional: colou?r finds colour and color.
  • ( ) around part of a pattern makes a group, and $1, $2 up to $9 in Replace with put each group back.
  • \. is a real dot; any special character is made plain with a backslash before it.

Two things work differently from some programs. ^ and $ mean the start and the end of the whole text, not of each line: ^Dear on two lines that both start with Dear changes only the first. To match the start of every line, use (^|\n) and put $1 back, as the next section shows. And $1 means a group only with Use a regular expression ticked: in plain text, $1 is just a dollar sign and a 1.

If a pattern can't be read, for example a bracket left open, the text stays as it was and the page says: "That regular expression can't be read. Check its brackets and special characters."

Ready-made patterns

Tick Use a regular expression for these. Each was checked on the example shown:

To do thisFindReplace with
Split 10-digit numbers into two groups: 98765 43210 to 98765-43210(\d{5}) (\d{5})$1-$2
Turn dates round: 2026-10-30 to 30/10/2026(\d+)-(\d+)-(\d+)$3/$2/$1
Rs. and Rs to ₹: Rs. 500 and Rs.700 to ₹500 and ₹700Rs\.\s?₹
Both spellings: colour and colorcolou?rthe word you want
Take the numbers off a numbered list: 1. Buy milk to Buy milk(^|\n)\d+\. $1
Rename numbered files: file1.txt to doc-1.txtfile(\d+)doc-$1

Check the note after each change: if it says more or fewer replacements than you expected, the pattern matched something else too. The top box keeps your original, so a wrong pattern costs nothing.

Opening a text file

Choose Open a text file, or drop a file anywhere on the page, and the tool reads it on your device. These files open: .txt, .md, .csv, .tsv, .log, .json, .xml, .srt, .vtt, .html and other plain-text files, with up to 500,000 characters. The file's name and size appear below the box with an x; press the x to remove the file's text. The file is read on your device and never uploaded. The result can be copied, or saved as a new text file; the file you opened is never changed.

  • Letters. A file saved as UTF-8 (a byte order mark at the start is dropped) or as UTF-16 with a mark is read correctly, Hindi and Tamil included. A file that is not valid UTF-8 is read as Windows-1252, and the page says so: "This file isn't saved as UTF-8, so it was read as Windows-1252. If letters look wrong, save it as UTF-8 and add it again."
  • Windows line breaks. A Windows file stores each line break as two characters. The tool reads the pair as one line break, so a line break found with \n is found in a Windows file too.
  • Several files. Only the first one opens, and the page says so, for example "Opening a.txt only. Open the others one at a time."
  • Not a text file. A Word, PDF or picture file renamed to .txt is not read, and the page says it doesn't look like a text file. A file named .docx, .pdf or .rtf gets this message: "Only text files (.txt and similar) can be opened here. For a Word or PDF file, copy its text and paste it into the box."
  • Empty or too long. An empty file says it is empty. A file with more than 500,000 characters is not opened, and the page says how many characters it has.

For a Word or PDF file, open it in the program you normally use, select the text, copy it, and paste it into the box. A PDF whose pages are scans holds pictures, not text, so there is nothing to copy.

Private: your text stays on your device

Your text never leaves your device. The tool runs inside your browser and has no upload step: it never sends the text you type, paste or open anywhere, and it keeps no copy of it, so closing the page forgets it. The page's Content Security Policy lets it contact only this site and Google's ad service, which pays for the site; our code never gives your text to the ad code. You can check it yourself in your browser's network panel (F12 on a computer): finding and replacing adds no request that carries your text. The site's menu does remember the last few tools you opened, on your device.

Text you edit is often personal: a letter, a contract, a list of names or a message. This tool lets you change words in it without handing it over. Our privacy policy says what we collect, and How we prove it shows how you can check our claims yourself.

Once the page has loaded, it also works with the internet switched off. In our test we switched the network off after the page had loaded and pressed Try a sample, and the result showed 0.2 seconds later or less in each of 15 runs.

Find and Replace Text after its sample: Friday replaced by Monday in the sample sentence, with 2 replacements made, at a phone's size with the internet switched off by our test, between our test's bands that read "Internet switched off" and "Nothing uploaded: 0 requests sent data"
Proof from our testOn 9 November 2026, our test opened Find and Replace Text at a phone's size, switched the internet off and ran it on its built-in sample. It finished with no connection, and none of the page's 15 requests sent any data.How we test, and how to check it yourself

Long texts

The tool takes up to 500,000 characters at once, about 500 KB of English text. What happens when a text is longer:

  • A paste that would go over the limit is not added. This holds for Ctrl+V, for press and hold, and for the Paste button. The page says, for example: "That text is very long (550,000 characters), so it was not added. The box can hold 500,000 characters. Split it into smaller parts for faster results."
  • A file with too many characters is not opened. The page says, for example: "long.txt has 550,000 characters, more than the 500,000 counted at once. Split it into smaller parts for faster results."
  • A text that gets in some other way stays, unchanged. If text is dragged into the box, for example, it stays there, the result stays empty and the note says: "This text is very long (550,000 characters). Split it into smaller parts for faster results."

Replacing is quick. In our tests it took 3 milliseconds or less to replace a short word everywhere in 500,000 characters of English, Hindi or a mix of English, Hindi, Tamil and emoji, matching whole words only. The slow part is the browser showing a very long text in a box, so a result of more than 100,000 characters shows only its first 100,000, without cutting an emoji in half, and the note says so, for example "Showing the first 100,000 of 164,999 characters. Copy and Download take all of it." Copy and Download always take the whole result.

Tips

  • Check the count. The note says how many replacements were made; compare it with what you expected. To see beforehand how often a word appears, use Word Frequency Counter.
  • Tick Whole words only for short words, so cat doesn't change category.
  • Include the space when deleting a word, as in these, so no double space is left.
  • Use \n for a new line, and \t for a tab.
  • Try a regular expression on a short sample first, then paste the whole text.
  • Do one change at a time. Copy the result into the top box to make a second change on top of the first. To take email addresses, links or numbers out of a text rather than change them, use Extract Emails; to turn titles into web-address slugs, use Text to Slug.

Limits

  • One search at a time. For several changes, copy the result back into the top box and run the next one.
  • No step-by-step choice. Every match is replaced; you can't skip some of them.
  • Start of line. ^ and $ mean the start and end of the whole text; use (^|\n) for each line.
  • Groups up to $9. $10 is read as group 1 followed by 0.
  • Digits are 0 to 9. \d doesn't match Hindi or other scripts' digits.
  • 500,000 characters at once, about 500 KB of English text. Text only: copy text out of Word or PDF files first.

Terms explained

Match
A place in the text where what you are looking for appears.
Whole word
A match with no letter, digit or underscore right before or after it.
Case sensitive
Treating capital and small letters as different. Match capital letters makes the search case sensitive.
Regular expression
A pattern that describes text, such as five digits or a word with or without a u.
Group
A part of a regular expression in brackets, which $1 to $9 put back in the replacement.
Escape
A backslash before a character that changes its meaning, as in \n for a new line or \. for a real dot.

Frequently asked questions

How do I find and replace a word in a text?

Paste the text into the top box, type the word in Find and the new word in Replace with. Every place it appears is changed at once, and the line under the result says how many. Copy the result, or download it.

How do I delete a word everywhere?

Type it in Find and leave Replace with empty. Every match is taken out. Include the space before the word, so no double space is left.

How do I replace a comma with a new line?

Type a comma and a space in Find, and \n in Replace with: the tool reads \n as a line break, so each item goes on its own line. The boxes are one line each, which is why \n stands for the line break.

How do I join lines with commas?

Type \n in Find and a comma and a space in Replace with. Every line break becomes a comma. Remove Line Breaks can do the same and keep paragraphs apart.

Why did it change part of a longer word?

Because a match can be inside a word until you tick Whole words only. With it ticked, cat no longer changes category.

Are capital letters ignored?

Yes, at first: cat finds Cat, cat and CAT. Tick Match capital letters to change only the form you typed.

Can I use regular expressions?

Yes. Tick Use a regular expression, and Find reads JavaScript's patterns, such as \d{5} for five digits. Groups in brackets go back into Replace with as $1 to $9. See Ready-made patterns.

Why does ^ change only the first line?

Here ^ means the start of the whole text, not of each line. To match the start of every line, use (^|\n) in Find and put $1 back in Replace with.

Can I replace several different words at once?

One search at a time. Make the first change, copy the result into the top box, and make the next.

Does it work for Hindi and other scripts?

Yes. Words in Hindi, Tamil and every other script are found and replaced, and Whole words only knows their letters: भारत is found as a word on its own.

Is Find and Replace free?

Yes. There is no sign-up and no watermark, and you can use it as often as you like. Ads from Google help pay for the site. They are kept apart from the tool, and our code never gives them your text.

Is my text uploaded anywhere?

No. The tool has no upload step: it works inside your browser and never sends the text you type, paste or open anywhere, and it keeps no copy of it. Google's ad code is on the page, and our code never gives it your text. How we prove it shows how to check.

How much text can it take at once?

Up to 500,000 characters, about 500 KB of English text. A paste or a file that would go over is not added, and the page says so. In our tests it took 3 milliseconds or less to replace a short word everywhere in 500,000 characters of English, Hindi or a mix of English, Hindi, Tamil and emoji, matching whole words only. See Long texts.

Can I open a text file, or a Word or PDF file?

A text file, yes: choose Open a text file or drop a .txt, .csv or similar file on the page, with up to 500,000 characters. A Word or PDF file must have its text copied out first, because the tool reads text, not those files.

Does it work offline?

Yes, once the page has loaded. In our test we switched the network off after the page had loaded and pressed Try a sample: the result showed 0.2 seconds later or less in each of 15 runs. If you open the page for the first time with no internet, it can't load.

By the PDFGuild team · Updated · How we test