JSON Formatter & Validator
Format, minify, check and repair JSON, with errors shown by line and column.
Questions
Why does my large ID number change in other tools?
JavaScript numbers hold about 15 to 17 digits. A 19-digit ID, like a Discord or Twitter snowflake, gets rounded, and the output looks fine but holds a different number. This tool keeps every digit and warns you about it.
Can a JSON object have duplicate keys?
The grammar allows it, and RFC 8259 only says names "should" be unique. Most parsers keep the last one and drop the rest without telling you. This tool keeps every entry and shows where the duplicate is.
Why is my JSON invalid when it looks like valid JavaScript?
JSON is stricter. Keys need double quotes, strings can't use single quotes, and trailing commas, leading zeros and comments aren't allowed.
What does it fix automatically?
Trailing commas, comments, single-quoted strings, unquoted keys, Python True/False/None, undefined and NaN, line breaks inside strings, and a Markdown code fence around the whole thing. It lists each change and its line. A missing comma or bracket is reported instead, because guessing where it goes could change your data.
What do the line and column numbers mean?
Both count from 1. The column points to where parsing stopped, which can be after the real mistake. A missing closing brace, for example, is reported at the end of the document.
Is my JSON uploaded?
No. Formatting, checking and repair run in your browser.
Related tools
- Base64 Encoder & DecoderEncode text to Base64 or decode it back, with URL-safe and file support.
- URL Encoder & DecoderPercent-encode text for URLs, or decode it back.
- JSON to YAML ConverterConvert JSON to YAML, or YAML to JSON.
- JSON to CSV ConverterConvert a JSON array to CSV, or CSV to JSON, with nested keys as columns.
- JSON DiffCompare two JSON documents and see every added, removed and changed value by path.