ToolsOps

JSON/YAML

Online JSON validator and formatter

Paste your JSON and check it instantly. The tool validates it, formats it with 2 spaces, 4 spaces or a tab, or minifies it to shrink its size. When something is off, the line and column are shown whenever the browser exposes them. Everything runs inside your tab: the text is never uploaded to a server and nothing is stored on your device.

Load example:

Enter JSON to validate.

Examples

  • {"name":"Anna","age":30,"admin":true}Simple object
  • {"user":{"id":1,"tags":["a","b","c"]}}Nested with array
  • {"data":[{"id":1,"title":"Hello"},{"id":2,"title":"World"}],"page":1,"total":2}Typical API response
  • {"a":1,"b":2,}Invalid — trailing comma error example
  • {"greeting":"Hello, 世界! 🌍"}With unicode

Frequently asked questions

Is my JSON data sent to a server?
No. All processing happens inside your browser. There are no backend calls, nothing is saved to localStorage, and everything disappears when you close the tab. You can use it with sensitive data without concerns.
Why does a large number look different after formatting?
JavaScript represents every number as an IEEE 754 double, so integers larger than 9,007,199,254,740,991 (`Number.MAX_SAFE_INTEGER`) lose precision when parsed. The JSON is still valid — it's not an error — but the tool surfaces a yellow warning about possible precision loss. If you need to preserve very large integer IDs, store them as strings in the source JSON.
My JSON has `//` comments and it errors out. Isn't that valid?
No. The JSON standard (RFC 8259) does not allow comments. What you have is JSONC or JSON5, extended formats this tool does not support on purpose, to avoid ambiguity. Remove the comments or use a JSONC-aware parser.
What's the difference between formatting and minifying?
Formatting (pretty-print) adds line breaks and indentation so the JSON is readable by humans. Minifying strips every bit of extra whitespace so the payload is as small as possible — useful for transport or storage. Both represent the exact same data.
I have the same key "a" twice but the output only shows one. Why?
When an object has duplicate keys, RFC 8259 leaves the behavior undefined. The browser's `JSON.parse` keeps the last occurrence, so only that one survives formatting. This tool validates standard JSON syntax and does not reliably detect duplicate keys: if your API depends on them, it sits outside the standard.
Is it safe to paste JSON with tokens or personal data?
Yes, within the reasonable limits of any browser tool. All processing happens inside your tab: nothing is sent to a server, nothing is stored in localStorage or cookies, and nothing is included in analytics or page metadata. Still, follow common sense: avoid pasting production secrets on shared browsers, close the tab when you're done, and be wary of browser extensions with access to the page.