Regex Tester & Debugger
Test and debug regular expressions online with live match highlighting, capture groups, and flags. Free and client-side.
// regex/gi○ ready
//gi
Test string
Matches · 0
Enter a pattern to begin.
Cheatsheet · click to insert
About this regex tester
Regular expressions are a compact language for finding and extracting patterns in text. This tester highlights every match live as you type, breaks out numbered and named capture groups, and reports errors in your pattern immediately — so you can build and debug a regex without leaving the page.
It uses your browser's JavaScript regex engine, so the results match what you will get in real JavaScript code. The clickable cheatsheet inserts common tokens to speed things up.
How to use it
- Type your pattern in the slashes at the top.
- Toggle flags like g (global) and i (ignore case).
- Paste your test text — matches highlight instantly.
- Review each match and its capture groups below.
Frequently asked questions
- Which regex flavour does this use?
- It uses the JavaScript (ECMAScript) regular expression engine built into your browser, so patterns behave exactly as they would in JavaScript code.
- What do the flags mean?
- g matches all occurrences, i ignores case, m makes ^ and $ match each line, s lets the dot match newlines, u enables full Unicode, and y anchors matching to the current position (sticky).
- Can I see capture groups?
- Yes. Every match lists its numbered capture groups ($1, $2, …) and any named groups, so you can confirm exactly what each part of your pattern captured.
- Is anything sent to a server?
- No. Your pattern and test text stay in your browser — matching runs entirely client-side.
// More tools
- JSON FormatterBeautify, minify, and validate JSON with precise error locations.
- Base64 Encoder / DecoderEncode and decode Base64 for text and files, including URL-safe.
- UUID GeneratorGenerate v4 and time-ordered v7 UUIDs in bulk, ready to copy.
- YAML ValidatorValidate YAML and convert to and from JSON.
- Case ConverterConvert between camelCase, snake_case, kebab-case, and more.
- HTML Entity EncoderEscape and unescape HTML entities and special characters.
- URL EncoderPercent-encode and decode URLs and query parameters.
- Number Base ConverterConvert between binary, octal, decimal, and hexadecimal.
- Color ConverterConvert colors between HEX, RGB, and HSL with a live preview.
- Unix Timestamp ConverterConvert Unix epoch timestamps to dates and back.
- JWT DecoderDecode a JWT's header and payload with readable claim times.
- Hash GeneratorGenerate MD5, SHA-1, SHA-256, and SHA-512 hashes from text.
- JSON ↔ CSV ConverterConvert JSON to CSV and CSV back to JSON.
- Cron Expression ExplainerTranslate a cron expression into plain English.