1. Home
  2. Tools
  3. Find & Replace Tool

Find and replace across a block of text, with a preview first

Doing a bulk rename inside a file is the job of your editor, not a web page. This is for the other case: a string that arrived from somewhere else, such as a log, a payload or a pasted configuration.

Modes
Literal or regex
Preview
Side by side
Capture groups
Supported
Find & Replace Tool Literal or regular expression, with a preview
Result

How to use it

  1. Paste the source text The text you want to transform.
  2. Enter the search and the replacement Plain text or a regular expression, depending on the mode. In regex mode you can use $1, $2 and named groups in the replacement.
  3. Review the changes The result is shown next to the original with the number of replacements counted, and you can copy it once it looks right.

Questions people ask

How do I use capture groups in the replacement?

In regex mode, write $1 for the first group, $2 for the second, and $name for a named group. A literal dollar sign is written as $$ so it is not mistaken for a reference.

Does it replace every occurrence or only the first?

Every occurrence. The count of replacements is reported so you can confirm what happened.

What is the difference between literal and regex mode?

In literal mode the search text is matched exactly. In regex mode it is a pattern, so a dot matches any character, brackets match a set, and a backslash starts an escape.

Can I search across multiple lines?

Yes, in regex mode the pattern can span newlines, and the s flag makes the dot match a line break as well.

Is there a size limit?

No explicit limit, though very large inputs make the live preview slow as you type. For files of many megabytes, use a command line tool.

Is my text sent to a server?

No. The replacement runs in the browser. That matters here because the text is often a log excerpt or a payload that contains identifiers you would rather not share.

Details that catch people out

Replacement syntax

In regex mode, $1 through $9 refer to the numbered groups and $name refers to a named group. A literal dollar sign is written as $$.

Where this earns its keep

Normalising a pasted log

A log with a timestamp format you want to standardise, or with ids padded in an unhelpful way, is fixed before you paste it anywhere else.

Rewriting a configuration payload

Replace a placeholder value in a JSON or YAML string you received, without editing the original file on disk.

Extracting a pattern from a batch

Use a capture group to pull a field out of every line and rewrite each line to contain only that field.

Guides that go deeper

Last reviewed 2026-10-10. Every tool on DevSnap runs entirely in your browser, so whatever you paste here never reaches a server.