Format and validate
Pretty-print compact API responses and identify invalid JSON syntax before using the data.
Free, private developer tool
Format, beautify, validate and minify JSON instantly. Paste text or upload a JSON file, inspect clear syntax errors, then copy or download the result—without sending your data to a server.
Pretty-print compact API responses and identify invalid JSON syntax before using the data.
Remove indentation and line breaks to produce a compact JSON string for transport or storage.
Processing stays inside your browser. No account, paste history or server upload is required.
A JSON formatter turns compact or inconsistently indented JSON into a readable structure. This online JSON beautifier uses standard parsing and stringification, and supports objects, arrays, strings, numbers, booleans and null values. See the number precision and duplicate-key limitations below. Choose two spaces, four spaces or tabs, and optionally sort object keys for easier comparison.
.json file up to 5 MB.Valid JSON requires double-quoted property names and strings, balanced braces and brackets, and commas between neighbouring values. Trailing commas, comments, single-quoted strings, undefined and unquoted keys are valid in some JavaScript contexts but are not valid JSON. This checker reports parsing errors rather than silently changing your data.
A compact API response is easier to inspect with consistent indentation. Paste this example into the editor above or choose Sample to try the controls.
{"name":"Esperto","active":true,"tools":["formatter","validator"]}{
"name": "Esperto",
"active": true,
"tools": [
"formatter",
"validator"
]
}{"name":"Esperto"}, rather than unquoted keys or single quotes.undefined. This tool accepts strict JSON, not JSON5 or JavaScript code.Choose two spaces, four spaces or tabs; optionally sort object keys; validate syntax; minify; and copy or download the result. File uploads support .json files up to 5 MB. Validation checks JSON syntax, rather than whether the data matches a JSON Schema or a business rule.
This formatter uses JavaScript’s JSON parser. Integers outside the safe range (−9,007,199,254,740,991 to 9,007,199,254,740,991) can lose precision; store large identifiers as quoted strings. Duplicate property names keep their last value. Formatting can normalize number notation and escape sequences, so keep a copy of the original when exact text matters.
Yes. Paste the response body or upload a .json file up to 5 MB, then choose Format JSON. HTTP headers and JavaScript variable declarations are not JSON and must be removed first.
Comments and trailing commas are not valid JSON. This tool uses JavaScript JSON.parse, which can round integers outside the safe integer range. Keep large identifiers as quoted strings. Duplicate property names keep only their last value when parsed.
Paste or upload your JSON, choose an indentation style and select Format JSON. The tool validates the syntax and produces a readable, pretty-printed result that you can copy or download.
Yes. Formatting, validation and minification happen locally with your browser's JSON parser. Your JSON is not sent to Esperto's server.
Formatting adds indentation and line breaks to make JSON easier to read. Minifying removes unnecessary whitespace to create a smaller single-line representation without changing the data.
Yes. Select Validate to check the syntax. If parsing fails, the tool displays the browser's error message and, where available, the line and column of the problem.