JSON Formatter and Minifier
Pretty-print or minify a JSON document in your browser, with a validation error that points to the exact line and column when the file is not valid JSON.
What this tool does
Open a single JSON document, choose pretty-printed (2-space indented) or minified (no whitespace) output, then copy or download the result. This tool shares its validation logic with the JSON Viewer, so a file that fails to parse here reports the same line and column there does.
Validation errors with position
When a file is not valid JSON, the error names the exact line and column where your browser's own JSON parser stopped — for a trailing comma, an unquoted key, an unterminated string, and similar mistakes. A small number of syntax errors (for example, extra content after an otherwise-complete document) do not carry a precise position at all; in that case the tool shows the parser's own message honestly rather than inventing a line number.
One document at a time
Like the JSON Viewer, this tool reformats exactly one JSON document. A newline-delimited JSON (JSON Lines) file is detected and rejected with a clear message rather than reformatted incorrectly.
A real limitation: number precision
Reformatting re-parses every number as a standard JavaScript number. An integer larger than 253 can lose precision, a number too large to represent (like 1e400) becomes invalid JSON once reformatted, -0 becomes 0, and a trailing .0 or scientific notation is not preserved exactly. If a file contains unusually large or precise numeric literals that must be preserved byte-for-byte, do not reformat it with this tool.
Browser-local processing
Parsing and formatting happen entirely in your browser's own JSON parser — no local data engine, no network request of any kind caused by the file's contents. See the privacy page for what that does and does not guarantee.
Large files
This tool warns above roughly 25 MB, warns more strongly above roughly 75 MB, and declines to open a file above roughly 150 MB — lower than the CSV and Parquet tools, because the whole document is held in memory and reformatted on the main thread rather than queried through a local database engine.
Related tools
- JSON ViewerValidate, search and explore any JSON document as a virtualized tree.
- JSON FlattenerFlatten nested JSON into flat key paths, previewed before export.
- JSON to CSVConvert JSON arrays to CSV, flattening nested fields.
- CSV to JSONComing soonConvert CSV rows to a JSON array or newline-delimited JSON.