Utinzo

Find & Replace

Find and replace text within any content — with plain text or regex support.

Did this tool work for you?

How to use this calculator

  1. 1

    Paste your text into the text box.

  2. 2

    Enter the text to find and the replacement.

  3. 3

    Choose between plain text (case sensitive or not) or regex mode.

  4. 4

    All occurrences are replaced, and the count is shown.

Frequently asked questions

Does the replacement field support \1 for capture groups?

No. In regular-expression mode use JavaScript syntax: $1, $2 for numbered groups, $& for the whole match, $$ for a literal dollar sign and $<name> for named groups. A reference to a group that does not exist is left as typed, so $3 with only two groups appears literally in the output.

How do ^ and $ behave in regex mode?

They match at the start and end of every line, because the pattern is run with the global and multiline flags. Searching for ^ and replacing with "- " puts a bullet at the start of each line. The dot does not match a line break; use [\s\S] to match across lines.

Can I make a regex search case-insensitive?

Not in regex mode, which has no flags option. Use the "Plain text (case-insensitive)" mode for literal searches. For a pattern, write the letters as classes, such as [Cc]at, or switch the mode if you do not need pattern features.

Why did "cat" also change "concat"?

Plain-text modes match the characters wherever they occur, including inside longer words. Replacing "cat" with "dog" in "Cat cat CAT concat" gives "Cat dog CAT condog" in the case-sensitive mode. To match whole words only, use regex mode with \bcat\b.

Are special characters like . or $ treated literally in plain mode?

Yes. Plain modes escape the search text, so searching for . replaces real dots only, and a $ in the replacement is inserted as a plain dollar sign. In regex mode the same dot matches any character, which is why replacing "." with "-" in "a.b.c" yields "-----".

What does "Invalid regular expression" mean?

The pattern failed to compile, for example an unbalanced bracket such as ( or [ typed on its own. The syntax is the JavaScript flavour. Escape special characters with a backslash, or switch to a plain-text mode for a literal search.

Is my text sent anywhere?

No. The replacement runs inside the page in your browser, and there is no network request in the tool’s code. The practical risk is a different one: a badly written pattern with nested repeats can make the tab unresponsive until it finishes.

What happens when the Find box is empty?

The text is returned unchanged with zero replacements. To delete text instead of substituting it, enter the text to find and leave Replace with empty.

About find & replace

Find and replace: plain text and JavaScript regex

Choosing a mode

Plain-text mode escapes everything you type and swaps exact occurrences, which is the right default for names, product codes or punctuation. Regex mode treats the Find box as a pattern, so one rule can reshape many different strings. Both replace every match, not only the first, and the Replacements row tells you how many changed.

Replacement syntax in regex mode

The replacement string follows JavaScript’s own rules. Because nothing is translated, the backslash style used by some editors does not work.

Tokens recognised in the Replace field
TokenInsertsExample
$1, $2 …The matching capture group(\w+) (\w+) with "$2, $1" turns John Smith into Smith, John
$&The whole matchAdds the original after your own text
$$A literal dollar signNeeded for currency: $$$1 turns 5 into $5
\1Nothing special: typed literallyUse $1 instead

Worked examples

Case-sensitive replacement of "cat" with "dog" in "Cat cat CAT concat" gives "Cat dog CAT condog" with 2 replacements; the case-insensitive version returns "dog dog dog condog" with 4. Reordering dates, the pattern (\d{4})-(\d{2})-(\d{2}) with replacement $3/$2/$1 turns "2024-05-17 and 2023-12-01" into "17/05/2024 and 01/12/2023" with 2 replacements. Finding ^ with the replacement "- " on three lines a1, b2, c3 prefixes each line and reports 3 replacements. A pattern like \bcat\b matches only the standalone word, so "concat" is left alone.

Common patterns

Use \s+ to match runs of whitespace, \d+ for numbers, [A-Z] for a capital letter and .* to take the rest of a line. Anchors ^ and $ work per line. Regex mode applies the global and multiline settings and nothing else, so there is no dot-all or case-insensitive option. Test a new pattern on a small sample first and compare the replacement count with what you expect before relying on a bulk change.

Doing a bulk edit safely

Look at the Replacements count before you accept a result. If you expected 12 changes and see 400, the pattern is too broad, and a small tweak such as adding \b around a word or an anchor at the start of a line usually fixes it. In regex mode the characters . * + ? ( ) [ ] { } ^ $ | and the backslash have special meanings; put a backslash before one to search for it literally, or use a plain-text mode. For several different edits, apply them one after the other, feeding each result back in.

Find & Replace – Utinzo

Learn more from an authoritative source:

Wikipedia
Related tools

Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →