{ }jsonkit
Tools/Query/Regex Tester
Search tools…⌘K
Format
{ }JSON Formatter
≡→JSON Minifier
\"JSON Escape / Unescape
a→zJSON Sorter
⇄{}JSON Flattener
Validate
JSON Validator
±JSON Diff / Compare
§JSON Schema Generator
JWT Decoder
ΔJSON Patch / Merge Patch
kbJSON Size Analyzer
Convert
→csvJSON to CSV
csv→CSV to JSON
⇄ymlJSON ⇄ YAML
⇄xmlJSON ⇄ XML
→tsJSON to TypeScript
b64Base64 Encode / Decode
%2FURL Encode / Decode
clkTimestamp Converter
→zJSON to Zod
→pyJSON to Pydantic
→goJSON to Go
→javaJSON to Java
⇄jsonlJSON ⇄ JSONL
5→JSON5 / JSONC to JSON
Query
$.JSONPath / JQ Tester
.*Regex Tester
Generate
Mock JSON Data Generator
idUUID / NanoID Generator
#Hash Generator
.*

Regex Tester — Test Regular Expressions Online

Live matches, named groups and capture details as you type.
processes as you type · client-side
Sample
Upload
Global (g)
Ignore case (i)
Multiline (m)
Dot-all (s)
⧉ Copy output ⌘C
Download
Share
Clear
$live results as you type · ⌘↵ to re-run
Test text324 B · paste or drop a file
1 2 3 4 5
Matches
codetree
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
{ "pattern": "(?<level>ERROR|WARN|INFO)", "flags": "g", "matchCount": 5, "matches": [ { "match": "INFO", "index": 20, "groups": { "level": "INFO" }, "captures": [ "INFO" ] }, { "match": "WARN", "index": 86, "groups": { "level": "WARN" }, "captures": [ "WARN" ] }, { "match": "ERROR", "index": 145, "groups": { "level": "ERROR" }, "captures": [ "ERROR" ] }, { "match": "INFO", "index": 212, "groups": { "level": "INFO" }, "captures": [ "INFO" ] }, { "match": "ERROR", "index": 278, "groups": { "level": "ERROR" }, "captures": [ "ERROR" ] } ] }
✓ valid (RFC 8259)324 B → 852 B0.0 msLn 1, Col 1UTF-8

About Regex Tester

The regex tester is a live playground for regular expressions: put your pattern in the query bar and your sample text in the input pane, and every match is highlighted in structured JSON as you type. It's the fastest way to confirm a pattern does what you think before you paste it into code.

Your pattern and your test text never leave the page — everything runs in your browser with no upload and no account. That makes it safe to try patterns against real log lines, user data or API payloads without sending them to a server.

It's built for developers writing validation rules, log parsers and find-and-replace patterns, and for anyone learning regex who wants immediate, readable feedback on what each match captured.

How it works

Pattern in the query bar, text in the pane

Type your regular expression in the query bar and paste the text you want to test in the input area. You can write a bare pattern like ([a-z]+)@(\w+), or a full /pattern/flags literal like /error/gi — inline flags in the literal are merged with the toggles below.

Flags: g, i, m, s

Global (g) finds every match instead of just the first; ignore case (i) makes the pattern case-insensitive; multiline (m) lets ^ and $ match at line breaks; dot-all (s) lets . match newlines. Toggle them on and the results update instantly.

Reading the match output

Each match reports the matched text, its index in the input, the numbered captures array, and a groups object for any named groups like (?<user>...). matchCount gives the total, so you can see at a glance how many times your pattern hit.

Named groups and captures

Parentheses create capture groups, returned in order in captures. Add a name with (?<name>...) and it also appears under groups, keyed by name — ideal for pulling structured fields such as user and host out of an email or a date out of a log line.

Frequently asked questions

How do I test a regex online for free?

Paste your test text into the input pane, type your pattern in the query bar, and matches appear immediately as structured JSON. It's completely free, needs no account, and runs entirely in your browser so nothing is uploaded.

How do I use named groups in regex?

Write (?<name>...) around the part you want to capture, for example (?<user>[a-z]+)@(?<host>\w+). Each match's groups object then contains keys like user and host with their captured values, alongside the numbered captures array.

Why does my regex loop forever or hang?

That's usually catastrophic backtracking: nested or overlapping quantifiers like (a+)+ or (.*)* force the engine to try an exponential number of ways to match, especially on input that almost-but-doesn't match. Make quantifiers more specific, avoid nesting them, and prefer character classes over broad . patterns. This tester caps output at 1000 matches to keep results readable, but that cap cannot prevent catastrophic backtracking itself — a pathological pattern can still hang the tab, so simplify the pattern if it does.

Can I paste a /pattern/flags literal?

Yes. Both a bare pattern and a /.../ literal work. If the literal carries inline flags, such as /foo/gi, those flags are merged with the g/i/m/s toggles, so you don't have to re-enter them.

Is my test text or pattern sent to a server?

No. The pattern and the text are matched locally in your browser using the native JavaScript regex engine. Nothing is uploaded, logged or stored, so it's safe for production data.

Related Query tools