Skip to content
Marvin's Toolbox.

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.

Runs entirely in your browser. Nothing you put in here gets uploaded.

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.

Tools that share a tag with this one.

Encode and decode Base16, Base32, Base36, Base45, Base58, Base62, Base64 and Base85. Pick the alphabet variant you need, from Crockford Base32 to Bitcoin Base58 and Ascii85, and convert in either direction.

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.

Open a CSV or TSV file and read it as a proper table. Sort by any column, filter rows with a search or per-column conditions, hide columns you do not need, and copy or download what is left.

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.