JSON Formatter & Validator
Format, minify and validate JSON, with the exact line of any error.
Use toolTest regular expressions with highlighted matches and capture groups.
Matches highlighted (3 found)
Invoices were sent on 2026-11-05 and 2026-12-01. The next one is due 2027-01-15.
| # | Match | Position | Groups |
|---|---|---|---|
| 1 | 2026-11-05 | 22 |
|
| 2 | 2026-12-01 | 37 |
|
| 3 | 2027-01-15 | 69 |
|
Type your regular expression between the slashes, without the slashes themselves.
Tick the flags you need, such as g for all matches or i to ignore case.
Paste the text to test. Matches are highlighted as you type.
Check the table for each match’s position and capture groups.
Regular expressions describe patterns in text: dates, phone numbers, email addresses, or anything you need to find, validate or replace. They are powerful but easy to get subtly wrong, so testing against real examples saves time.
This tester uses your browser’s own JavaScript engine, so a pattern behaves here exactly as it will in JavaScript and TypeScript code. Most patterns also work the same in PHP, Python and other languages, apart from a few advanced features.
Capture groups in parentheses are listed for every match as $1, $2 and so on, and named groups such as (?<year>\d{4}) are shown by name.
JavaScript (ECMAScript), as built into your browser. It supports lookbehind, named groups and Unicode property escapes.
Without the g (global) flag a regular expression stops after the first match. Tick g to find them all.
Escape it with a backslash: \. matches a dot and \( matches an opening bracket.
No. Matching runs in your browser.
Format, minify and validate JSON, with the exact line of any error.
Use toolEncode text to Base64 or decode Base64 back to text.
Use toolRead the header and payload of a JSON Web Token and check its expiry.
Use toolDesign linear and radial gradients and copy the CSS.
Use tool