Find and Replace Text

Find and replace words or patterns in text, with optional regular expressions, case sensitivity and whole-word matching. 🔒 Runs in your browser

Output

How to use the Find and Replace Text

  1. Paste your text in the Input box, drop a file on it, or click "Example" to try it.
  2. Adjust the options (find, replace with, use regular expression, case sensitive) to fit your needs.
  3. The output updates instantly as you type.
  4. Click Copy or Download. Use "Use as input" to chain another operation.

About this tool

Find and replace words or patterns in text, with optional regular expressions, case sensitivity and whole-word matching. It is part of the free Text Tools collection on Online Tools Harbor. Everything happens locally in your browser, so it is fast and private.

Frequently asked questions

Can I use capture groups?

Yes. Tick "Use regular expression" and reference groups with $1, $2… in the replacement. Use \n for a new line.

Can I replace with nothing?

Yes, leave "Replace with" empty to delete every match.

Is the Find and Replace Text free?

Yes. The Find and Replace Text is completely free to use, with no sign-up and no limits on normal use.

Is my data safe?

Yes. This tool runs entirely in your web browser using JavaScript. Your text is never uploaded to our servers.

Is there a size limit?

There is no fixed limit: it depends on your device. Several megabytes of text are processed in a fraction of a second on most computers.

Does it work on mobile?

Yes, it works in any modern browser on phones, tablets and computers. No app to install.

Related tools

Remove WhitespaceRemove extra spaces, tabs and blank lines from text, or strip every whitespace character at once.Remove Line BreaksTurn text broken across many lines (PDF copy-paste, emails) into clean single-line paragraphs.Add Line BreaksInsert line breaks every N characters, after every sentence, every N words or after a delimiter.Bulk Find and ReplaceNewRun many find-and-replace rules at once. One rule per line: old => new.HTML to TextStrip HTML tags and convert a web page or email template to clean, readable plain text.Word CounterCount words, characters, sentences, paragraphs and estimate reading time.Character CounterCount characters with and without spaces, plus limits for X/Twitter, meta descriptions, SMS and Instagram.Sentence CounterCount sentences and see average sentence length to improve readability.Line CounterCount lines, non-empty lines and unique lines in text, code or lists.