JSON Formatter & Validator
Format and validate JSON instantly. Fix common errors automatically — trailing commas, curly quotes, Python-style True/False/None, and unquoted keys. Sort keys alphabetically, minify for production, upload files or load from a URL.
Why Your JSON Keeps Breaking
The most common JSON errors are not complex — they are small, invisible mistakes. A trailing comma after the last item. Curly quotes (“like this”) instead of straight quotes ("like this") that Word and mobile keyboards introduce. Python-style True, False, None instead of JSON's lowercase equivalents. Unquoted key names copied from JavaScript object literals. The Fix & Format button catches and corrects all of these automatically before formatting.
Format vs Fix & Format
Format parses your JSON as-is and formats it if valid. If there are errors it shows the exact position. Fix & Format first attempts to repair common mistakes — removing trailing commas, replacing curly quotes, stripping // and /* */ comments, correcting True/False/None, and wrapping bare keys in quotes — then formats the result. It shows what changed so you can review.
Sort Keys
Tick "Sort keys" before formatting to output all object keys in alphabetical order at every level of nesting. Useful for diffing two JSON objects (sorted output makes changes easier to spot), for normalising API responses in tests, and for producing consistent output when the key order from the source is unpredictable.
Load From URL
Click Load URL and paste any public API endpoint to fetch and format the JSON response without leaving the page. Useful for quickly inspecting the shape of an external API. Note that some APIs block cross-origin requests — if loading fails, copy the response from your browser's Network tab instead.