Regex Tester
Test JavaScript regular expressions live: see every match highlighted in your text, with positions and capture groups, plus full flag support. Your pattern stays in your browser.
How it works
This uses your browser's own JavaScript regular-expression engine. Matches are highlighted in the test
string, and each match is listed with its position and any capture groups, the parts
wrapped in parentheses. Add the g flag to find every match rather than just the first.
Your pattern and text never leave your browser.
What this does
A regex tester runs a JavaScript regular expression against your text live, highlighting every match with its position and capture groups.
How to use it
- Enter a pattern and flags.
- Paste your test text.
- See matches highlighted.
- Inspect the capture groups.
How it works
It uses your browser’s built-in JavaScript engine, so the syntax and flags (g, i, m, s, u, y) match real JavaScript. Capture groups are the parts of a match wrapped in parentheses.
Example
The pattern [0-9]+ highlights every run of digits in your text.
Sources & methodology
Last updated .
Frequently asked questions
Which regex flavour does it use?
It uses your browser’s built-in JavaScript engine, so the syntax and flags (g, i, m, s, u, y) match what runs in real JavaScript.
What are capture groups?
They are the parts of a match wrapped in parentheses. Each match lists its groups so you can see exactly what was captured.
Is my pattern or text uploaded?
No. Matching happens locally in your browser; nothing is sent or stored.
Related tools
Word Counter
Count words, characters, sentences, paragraphs and lines as you type, with an estimated reading time. Fast and private, your text is analysed in your browser.
Case Converter
Convert text between UPPER, lower, Title, Sentence case and programmer styles like camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. Instant and in-browser.
Slug Generator
Turn any title into a clean, URL-friendly slug: accents are stripped, spaces and symbols become hyphens, and the result is lowercased. Slugify many lines at once, all in your browser.
Sort Lines
Sort a list of lines alphabetically, by length or numerically, in either direction, with optional case-sensitivity, trimming and duplicate removal. Runs entirely in your browser.