Skip to content

Find and Replace Text

Search a text, see every match highlighted and replace them all at once.

Matches highlighted (0)

Paste a text, type what to look for and what to put in its place. Every match is highlighted and counted as you type, so you can check the search before changing anything. Then replace all matches at once, or only the first one, with an undo button if the result is not what you wanted.

Options cover the common needs: match capital letters exactly, match whole words only so “cat” does not change “category”, and full regular expressions with capture groups like $1. The text is processed on your own device, which makes it fine for private notes, code and data.

How to use the Find and Replace tool

  1. Paste your text into the big box.
  2. Type the word or pattern in Find. Matches are highlighted in the preview.
  3. Type the new text in Replace with, or leave it empty to delete the matches.
  4. Set Match case, Whole words only or Regular expression if needed.
  5. Click Replace all, then copy or download the result.

Why use ToolOrca Find and Replace

  • Live highlighted preview and match count
  • Match case and whole-word options
  • Regular expressions with $1 capture groups
  • Insert line breaks and tabs with \n and \t
  • Undo any replacement
  • Works offline in your browser

Useful regular expression replacements

Turn on Regular expression for pattern-based edits. \s+ replaced with a single space collapses runs of spaces; ^\s+|\s+$ replaced with nothing trims every line; (\w+)@(\w+) with $2: $1 swaps the parts of an address. \d+ matches any number and ^ matches the start of each line, so replacing ^ with - turns lines into a bullet list.

Tick Use \n and \t in replacement to insert line breaks and tabs, for example to put every comma-separated value on its own line by replacing , with \n.

Frequently asked questions

How do I replace a word everywhere in a text?

Type the word in Find, the new word in Replace with and click Replace all. Tick Whole words only so parts of longer words are left alone.

How do I replace line breaks with commas?

Tick Regular expression, search for \n and replace with , . To do the opposite, search for , and replace with \n with the escape option ticked.

Can I undo a replacement?

Yes. Undo restores the text as it was before each replacement, step by step.

Which regex syntax is supported?

JavaScript regular expressions, including character classes, groups, lookahead and lookbehind. Use $1, $2 in the replacement for captured groups and $& for the whole match.