๐Ÿ”Ž

Find and Replace Text

Find and replace words or phrases in text, with case-sensitive, whole word and regular expression options.

Built and maintained by Abdur Rehman ยท Free, no sign-up

Loading Find and Replace Textโ€ฆ
๐Ÿ”’PrivateRuns in your browser โ€” nothing is uploaded.
โšกFastInstant results, no waiting in queues.
๐Ÿ’ธFreeNo sign-up, no watermark, no limits.
๐Ÿ“ฑAnywhereWorks on phone, tablet and desktop.
</> Embed this tool on your website โ€” free

Paste this code into any web page or blog post (WordPress: use a โ€œCustom HTMLโ€ block). It's free for personal, school and business sites โ€” just keep the credit link.

How to use the Find and Replace Text

  1. Paste your text
  2. Enter what to find and what to replace it with
  3. Copy the updated text

Replace every match at once

Paste your text, type what to Find and what to Replace with, and every match is replaced, with a count of how many changes were made. Options: Match case, Whole words only (so โ€œcatโ€ doesn't change โ€œcategoryโ€) and Regular expression for advanced patterns, with $1 to reuse captured groups.

Regular expression examples

  • Find \s+ โ†’ replace with one space: collapses repeated spaces.
  • Find (\w+)@example\.com โ†’ $1@newdomain.com: change an email domain.
  • Find (\d{2})/(\d{2})/(\d{4}) โ†’ $3-$2-$1: turn 21/10/2026 into 2026-10-21.

In other programs

  • Word and Excel โ€” Ctrl + H.
  • AutoCAD โ€” the FIND command.
  • InDesign โ€” Edit โ†’ Find/Change.
  • Illustrator โ€” Edit โ†’ Find and Replace.
  • Revit โ€” Annotate โ†’ Find/Replace.

In a PDF

PDFs can't be edited like a text file. Extract the text with PDF to Text or convert it with PDF to Word, make your replacements here or in Word, then save it as a PDF again.

Text on a web page or form

No browser extension is needed: copy the text here, replace, and paste it back.

Handy recipes

Tick Regular expression for these. In the patterns, . never matches a line break, so (.+) picks up one whole line at a time.

To do thisFindReplace with
Add a bullet to every line(.+)โ€ข $1
Wrap lines in quotes with a comma (for SQL or code lists)(.+)'$1',
Join all lines into one, separated by commas\n,
Remove empty lines\n\s*(?=\n)(leave empty)
Swap "Smith, John" to "John Smith"(\w+), (\w+)$2 $1
Remove HTML tags<[^>]+>(leave empty)
Delete text in brackets\s*\([^)]*\)(leave empty)

Without the regular expression option, everything you type is taken literally, including $, dots and brackets. Matching ignores upper and lower case unless you tick Match case. Your original text stays in the input box, so if a replacement goes wrong, adjust it and try again.

Frequently asked questions

How do I replace line breaks with commas?

Tick Regular expression, find \n and replace with a comma and a space. Every line is joined into one comma-separated line.

Is find and replace case-sensitive?

Not by default: "cat" also matches "Cat" and "CAT". Tick Match case to replace only the exact capitalisation you typed.

Can I undo a replacement?

Your original text stays in the input box and the result appears separately, so you can change the options and run it again at any time.

โœ๏ธ Keep exploring Text Tools

See all Text Tools