JSON Formatter & Validator
Paste any JSON - formatted, minified or broken - and get a nicely indented pretty-print, a minified version, or an exact error message with the position of the syntax problem. Nothing is uploaded.
- Free, no limits
- No login
- Runs in your browser
About this tool
JSON is the format that powers Discord webhooks, bot configurations, and API responses. This formatter pretty-prints your JSON with proper indentation, minifies it for storage efficiency, and reports the exact position of any syntax error.
Everything happens in the browser. Your JSON is never uploaded.
How to use
Paste JSON into the editor.
Click Format or Minify.
Fix syntax errors using the exact line position.
What JSON permits and what it does not
JSON is stricter than JavaScript object syntax, and the differences cause most parse errors. Keys must be double-quoted strings. Single quotes are invalid anywhere. Trailing commas are invalid. Comments are invalid. Numbers cannot have leading zeros or a trailing decimal point, and NaN and Infinity are not representable.
Most parse failures in practice are a trailing comma or a copied JavaScript literal with unquoted keys. A formatter that reports the character offset of the failure usually points within a few characters of the real problem.
The specification requires UTF-8 and permits any Unicode in strings, so emoji and accented characters need no escaping. Escapes are still valid, which is why the same document can appear in two very different-looking but equivalent forms.
Precision and large integers
JSON numbers have no defined precision, but JavaScript parses them as doubles, which represent integers exactly only up to 2^53 - 1. Discord snowflakes exceed that, which is why the API returns every ID as a quoted string.
Parsing such a string as a number silently rounds it and produces an ID that is close but wrong - and wrong in a way that looks plausible, so it survives casual inspection. Any code touching Discord IDs should keep them as strings or convert to BigInt, never to Number.
JSON in the Discord ecosystem
Every webhook payload, embed object and bot API response uses JSON. Being able to format a messy response into readable indentation, or minify a large embed JSON for storage, is an everyday task for bot developers and server admins.
Common JSON mistakes
The three errors people hit most often are trailing commas after the last item, single quotes around keys or strings, and unescaped quotes inside a value. A validator that points to the exact position saves you from reading a huge file line by line.
Frequently asked questions
What causes a JSON syntax error?
Common causes are trailing commas, unescaped quotes inside strings, and using single quotes instead of double quotes.
Try other relevant tools
Snowflake ID & Date Converter
Convert between Discord IDs and exact dates - both directions.
Discord Timestamp Generator
Create <t:123:r> timestamps that render in every reader’s local time.
Discord Token Decoder
Decode the payload of a Discord token to reveal the embedded user ID and type.