Paste raw JSON to format, validate and minify it — errors highlighted with line numbers.
Did you know?
JSON was created by Douglas Crockford around 2001 as a simpler alternative to XML. The name stands for JavaScript Object Notation, though it is now used across virtually every programming language.
Common JSON errors and how to fix them
Trailing commas — JSON does not allow a comma after the last item in an object or array. Remove the last comma.
Single quotes — JSON requires double quotes for both keys and string values. Replace single quotes with double quotes.
Unquoted keys — Unlike JavaScript objects, JSON keys must always be wrapped in double quotes.
Comments — JSON does not support comments. Remove any // or /* */ before validating.
FAQ
What is JSON?
JSON (JavaScript Object Notation) is a lightweight text format for storing and exchanging structured data. It is supported by virtually every programming language.
What is the difference between formatting and minifying JSON?
Formatting adds indentation and newlines to make JSON human-readable. Minifying removes all whitespace to reduce file size for production use.
Why is my JSON invalid?
Common errors include trailing commas, single quotes instead of double quotes, unquoted keys and unescaped special characters.