Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

Find and Replace

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Everything runs locally in your browser. Your data never leaves your device.

Next steps

Send this tool's output straight into another tool.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

Convert between scientific notation and full numbers as you type. Reads 1.23e5, 1.23 × 10^5 and plain numbers, shows the value written out, in normalized scientific notation and in engineering notation, and can round to any number of significant digits.

About the Find and Replace Tool

This tool finds text and replaces it, live, in everything you paste. Text mode replaces every occurrence of a plain string. Regex mode takes a full regular expression with flag controls and capture group references, for the replacements a plain string cannot express.

It covers the gap between a quick manual edit and opening an editor: fixing a name across a document, rewriting URLs in a list, reformatting dates with a pattern.

What you can do

  • Replace all occurrences of a word or phrase in one go.
  • Match case or replace whole words only.
  • Replace with a regular expression, using groups like $1 in the replacement.
  • Control the regex flags: global, ignore case, multiline and dot matches newline.
  • See how many replacements were made.

How to use the Find and Replace

  1. 1Choose Text or Regex mode.
  2. 2Enter what to find and what to replace it with.
  3. 3Set the options: match case and whole word in text mode, the flags in regex mode.
  4. 4Paste your text on the left and read the result on the right, then copy it.

Text mode is always literal

In text mode nothing is interpreted. Searching for $5 (net) finds exactly those characters, and a $ in the replacement stays a $. Match case requires the exact capitalization you typed, and whole word stops 'cat' from matching inside 'catalog'.

Regex mode in short

Regex mode uses JavaScript regular expressions. The replacement understands $1 and named groups like $<name>, plus $& for the whole match. The global flag is on by default so every match is replaced, turn it off to replace only the first. Multiline makes ^ and $ match at each line break, which is handy for prefixing every line. An invalid pattern shows the error instead of guessing.

If you just want to understand a block of JSON rather than rewrite text, the JSON Inspector is the better fit.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Format code in JavaScript, TypeScript, JSON, JSON5, HTML, Vue, CSS, SCSS, LESS, Markdown, YAML, GraphQL, XML and SQL. Pick tabs or spaces, set the indent width, and format the input in place with one click.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Escape text into HTML entities or decode entities back to plain text. Choose named or numeric entities, escape only the unsafe characters or everything outside ASCII, and read the result live.

Reveal the characters you can't see in a text: zero-width spaces, non-breaking spaces, bidi marks, control characters and CRLF versus LF line endings. Inspect every occurrence and clean them out with a click.

Strip the sensitive bits out of a log or any text before sharing it: emails, IP and MAC addresses, file paths, UUIDs, timestamps, URLs, tokens and more. Pick what to redact and how it is replaced, with stars, a fixed character, a type label or a length-preserving mask.