How to test a regex
Enter a pattern and flags, then type or paste your test string. Matches are highlighted and listed with their index and capture groups.
Flavour
This uses JavaScript regular expressions. Most syntax carries over to other languages, but features like lookbehind or named groups can differ.
Frequently asked questions
What do the flags mean?
g = all matches, i = ignore case, m = ^ and $ match per line, s = dot matches newlines, u = Unicode, y = sticky.
Why does my regex hang?
Nested quantifiers like (a+)+ can backtrack catastrophically on some inputs. Simplify the pattern.
Related tools
JSON Formatter & Validator
Format, minify, validate and sort JSON with clear error positions.
JSON Diff
Compare two JSON documents and see exactly what was added, removed or changed.
Markdown Previewer
Write Markdown and see the rendered result live.
Base64 & URL Encoder / Decoder
Encode and decode Base64 and URL-encoded text, with full UTF-8 support.
JWT Decoder
Decode a JSON Web Token's header and payload and check its expiry.
Cron Expression Builder
Build and understand cron schedules, with plain-English descriptions and next run times.