Regex Tester & Replacement Playground

Test patterns with JavaScript regular-expression semantics, inspect capture groups, and preview replacements without changing your source text.

g
Flags

36 / 100,000 characters. Matching and replacement run in a disposable Worker with a 500 ms timeout.

Global (g) replaces every match; without it, only the first match is replaced. JavaScript replacement tokens such as $1 and $& are supported.

Engine: the browser's JavaScript RegExp implementation. Pattern limit: 500 characters. Sample limit: 100,000 characters. Replacement previews are capped at 1,000,000 characters and 5,000 matches. A timed-out worker is terminated to keep the page responsive.

Examples and related tools

URL Encoder/DecoderHTML Encoder/Decoder