JSON Formatter
Format, minify, and validate JSON. Shows the exact line of any error.
Runs in your browser. Nothing is uploaded.
Input
Waiting for JSON
Output
Formatted JSON appears here.What this does
Paste JSON or drop a file. You get it back indented and readable, or squeezed onto one line for sending over the wire. If the JSON is broken, the status line tells you the line and column.
Is my data uploaded?
No. Formatting happens in your browser with the built-in JSON parser. Nothing is sent anywhere, so it is safe for API keys and customer data.
Sort keys
Turn on Sort keys to order every object alphabetically. Two responses formatted this way can be compared line by line.
More json tools
All- JSON Viewer & Path FinderExplore JSON as a tree or a graph. Click any value to copy its path in JS, jq, JSONPath, or Python.
- JSON Diff & CompareCompare two JSON documents and see every added, removed, and changed value in one view.
- JSON to CSV ConverterTurn a JSON array into CSV for Excel or Google Sheets. Nested objects flattened, table preview.
- CSV to JSON ConverterTurn CSV or TSV into a JSON array of objects. Numbers and booleans detected, dotted columns nested.
- JSON to TypeScriptTurn any JSON into TypeScript interfaces. Nested types named, optional keys detected.
- JSON to Go StructGenerate Go structs with json tags from any JSON. Nested structs named, pointers for nullable values.
- JSON to Kotlin Data ClassGenerate Kotlin data classes from JSON, for kotlinx.serialization, Gson, or plain Kotlin.
- JSON to Java ClassGenerate Java records or POJO classes with Jackson annotations from any JSON.