JSON Formatter
Paste JSON to format, validate or minify it instantly — with the exact line and column of any error. Nothing leaves your browser.
Paste or type JSON above to validate, format or minify it — with the exact line and column of any error.
자주 묻는 질문
How does this JSON formatter show the exact error location?
When your text is not valid JSON, most online tools only say "invalid". This JSON validator goes further: it reads the byte position that the browser's own JSON parser reports for the first syntax error, converts it into a human line and column, and prints "Invalid JSON — line L, column C" alongside the parser's own message. Click Format or Minify and the offending line is selected in the input box so you can jump straight to it. That makes fixing a missing comma, an unclosed bracket or a stray quote far quicker than hunting through the whole document.
Format vs Minify vs Validate — what does each button do?
Format (beautify) re-indents your JSON with 2 spaces, 4 spaces or a tab so it is easy to read, optionally sorting object keys alphabetically. Minify strips every unnecessary space and newline to produce the smallest single-line JSON, ideal for API payloads and config values. Validate happens automatically as you type: the status badge turns green "Valid JSON" with key, depth and byte statistics, or red with the line and column of the first error. All three run instantly in your browser on the same parsed data.
Is my JSON sent to a server?
No. This JSON formatter runs 100% in your browser using the built-in JSON engine — nothing you paste is ever uploaded, logged or shared. That makes it safe for JSON that contains API keys, access tokens, secrets or personal data (PII), unlike ad-heavy sites that post your text to a backend. Your most recent input is optionally kept in this browser's local storage so it is still here when you return; untick "Save my JSON in this browser" to keep it for the session only, and Clear removes the stored copy.
Why do comments, single quotes or trailing commas fail?
Because this tool validates against the standard JSON specification (RFC 8259), not the relaxed JSON5 or JSONC dialects. Standard JSON requires double quotes around every key and string, forbids trailing commas after the last item, and does not allow comments (// or /* */) or single quotes. If your file uses those, the validator will point to the exact spot that breaks the rules — remove the comment, swap single quotes for double quotes, or delete the trailing comma and it will parse.
Why do very large integers lose precision, and how are duplicate keys handled?
JSON numbers are parsed as standard IEEE-754 doubles, so any integer above 2^53 − 1 (9,007,199,254,740,991) may be rounded — for example a 64-bit ID like 9223372036854775807 can come back slightly changed. Keep such values as strings if exact digits matter. When an object contains the same key twice, standard JSON keeps only the last occurrence, so duplicates are silently merged; the formatter follows that rule, which is another reason to validate machine-generated JSON before trusting it.