Regex Tester

JavaScript regular expressions with live matches.

Loading tool

This tool runs in your browser. Nothing is uploaded.

Type a pattern, flip flags, and watch matches highlight in the sample. Invalid patterns show the engine error.

How to use this tool

  1. Paste the snippet. Drop JSON, code, or a token into the input. It is not sent to a server.
  2. Run the action. Format, decode, or generate. Parse errors stay on the page.
  3. Copy the output. Copy the result back into your editor or terminal.

Engine

This is the browser's JavaScript RegExp, including named groups and lookbehind where the engine supports them. It is not PCRE or .NET.

Frequently asked

Can I use /x comments?

No. JavaScript has no free-spacing flag.

Does it support recursive patterns?

No. Stay inside JS syntax.

Why did a greedy pattern freeze the tab?

Catastrophic backtracking can lock the engine. Keep samples short while you experiment.

Are replacements available?

A replace box uses the same pattern. For a full document, use Find and Replace.

Is my sample uploaded?

No.