Format, validate and minify JSON instantly, with errors pointed out by line and column. Your data stays on your device.
Shares this page only, not your entries.
✓ Valid JSON · 3 keys · 6 values · 2 levels deep
Features
Validates JSON as you type (the RFC 8259 standard) and points to the line and column of the first mistake, with a hint for the usual ones.
Pretty-prints with 2 or 4 spaces or tabs, or minifies to one line; Sort keys A–Z orders every object's keys.
Keeps every number, string and escape exactly as written, and keeps duplicate keys instead of dropping one silently.
Open a .json file or paste text; copy or download the result as a .json file.
Common JSON mistakes
Keys and strings must use double quotes: {"a": 1}, not {a: 1} or {'a': 1}.
No trailing commas after the last item: [1, 2], not [1, 2,].
No comments: JSON doesn't allow // or /* */.
No NaN, Infinity or undefined; use null or a number.
Frequently asked questions
Is my JSON uploaded?
No. Parsing and formatting happen entirely in your browser, which makes it safe for API responses, tokens and config files.
Will formatting change my data?
No. Only spaces and line breaks change (and the key order, if you tick Sort keys). Numbers stay exactly as written: many formatters run JSON through JavaScript, which rounds integers above 9,007,199,254,740,991, such as 12345678901234567890, and turns 1.50 into 1.5. Escapes like \u00e9 are kept too.
How do I find the error in my JSON?
The message names the mistake with its line and column, and shows that line with a ^ under the spot. The usual causes are a trailing comma after the last item, single quotes instead of double quotes, keys without quotes, comments, and a missing comma between items.
How big can the JSON be?
You can open files up to 10 MB. Big files take a moment to show in the boxes, and texts over 1 MB are formatted when you stop typing so the page stays responsive.
Why minify JSON?
Minifying removes all spaces and line breaks to make the file smaller for APIs and storage. Pretty-printing with 2 or 4 spaces or tabs makes it readable again.