JSON Formatter & Validator

Validate JSON and see the exact line and column of any syntax error. Pretty-print with 2 or 4 spaces or tabs, minify, sort keys, then copy or download.

  • Runs in your browser (no upload)

Up to 5 MB per file

Paste text or open a JSON file (up to 5 MB). Your data never leaves the browser.

Result

Valid JSON.
Top level
Object (7 keys)
Max depth
2
Values
15
Input size
173 B
Output size
245 B

How to use

  1. Paste JSON or open a JSON file.
  2. Choose the output style (2 spaces, 4 spaces, tabs or minified) and turn on key sorting if you want.
  3. Valid JSON is formatted instantly — copy or download it. If there is an error, the line, column and the exact spot are shown.

FAQ

Can large numbers lose digits?

No. Numbers are kept exactly as written, so integers such as 12345678901234567890 are not rounded. You also get a warning when an integer cannot be represented exactly by JavaScript.

How are line and column counted?

Lines end at LF, CRLF or CR, and the column counts characters from the start of the line (an emoji counts as one). Positions come from our own validator rather than the browser-specific JSON.parse messages.

Are comments or trailing commas allowed?

No. Validation follows standard JSON (RFC 8259), so JSON5 or JSONC syntax is reported as an error with its position.

Notes & limitations

  • What you enter is processed only on this page and is not sent to YUCTS servers.
  • Input is limited to 5 MB.
  • JSON5, JSONC (comments, trailing commas) and NDJSON (one JSON value per line) are not standard JSON and are reported as errors.
  • Duplicate keys in one object are syntactically valid, so they are shown as a warning rather than an error and both entries are kept in the output.

Data sources