Free developer tools

JSON Formatter & Validator.

Validate, pretty-print and minify JSON with exact error positions — entirely in your browser.

Developed and hosted in the EU
JSON Formatter
Validate · format · minify
Runs entirely in your browser
Format or minify — the result appears here.

Parsing and formatting happen on your device — nothing you paste is transmitted, stored, or logged.

Strict by design

JSON's grammar (RFC 8259) is deliberately tiny: double-quoted strings, no comments, no trailing commas, and exactly six value types. That strictness is why every language can parse it identically — and why editors that accept relaxed variants (JSONC, JSON5) can lull you into writing files that real APIs reject. This validator applies the strict rules and tells you the exact line and column where parsing fails.

The errors everyone makes

  • Trailing comma[1, 2, 3,] is invalid JSON.
  • Single quotes — strings and keys need double quotes.
  • Comments// and /* */ do not exist in JSON.
  • Special valuesNaN, Infinity and undefined are not valid JSON values.

Format for humans, minify for machines

Indentation is purely cosmetic: a formatted and a minified document carry identical data. Pretty-print when you debug an API response or review a config; minify when the payload ships over the network — for large documents the whitespace alone can be a double-digit percentage of the size (this tool shows you exactly how much).

Sorted keys, stable diffs

JSON object members are officially unordered, so sorting keys alphabetically never changes the meaning — but it makes two documents comparable at a glance and keeps version-control diffs quiet. Useful before committing config files or comparing two API responses side by side.

Frequently asked questions

Why is my JSON invalid?
The usual suspects: a trailing comma after the last element, single quotes instead of double quotes, unquoted property names, comments (JSON does not allow them), or special values like NaN and undefined. This validator points you to the exact line and column of the first problem.
Does JSON allow comments?
No — standard JSON (RFC 8259) has no comment syntax. Variants like JSONC (used by VS Code configs) and JSON5 allow them, but APIs and parsers expecting plain JSON will reject commented files. A common workaround is a regular data field like "_comment".
Why are trailing commas not allowed?
JSON is a strict subset of JavaScript literal syntax, frozen by design for interoperability. Allowing [1, 2, 3,] would be convenient, but every parser in every language would need to agree — so the standard keeps the grammar minimal and strict.
What is the difference between formatting and minifying?
Formatting (pretty-printing) adds indentation and line breaks so humans can read the structure. Minifying removes all insignificant whitespace to make the payload as small as possible for transfer. Both represent exactly the same data.
Is it safe to paste confidential JSON here?
Validation and formatting run entirely in your browser — nothing you paste is transmitted, stored, or logged. You can verify this in your browser's network tab or use the page offline. Many online formatters process JSON server-side; this one never does.
How large can the JSON be?
The tool comfortably handles several megabytes. Very large documents (tens of MB) may make the browser tab sluggish while formatting — for those, command-line tools like jq are the better fit.
Does sorting keys change my JSON's meaning?
No — JSON object members are officially unordered, so sorting keys alphabetically produces equivalent data. It is useful for comparing two documents or producing stable diffs. Only rely on key order if you know the consuming parser preserves it (most do, but the standard does not promise it).

Free tools from a European software company.

  • Runs in your browser
  • Made & hosted in the EU
  • No account needed