GlossQuote-Labs / JSON

JSON validator and formatter

Keep original number and string spellings. Stop on duplicate keys.

Paste JSON, up to 256 KiB. Your clipboard is never read automatically.

Output format

Paste JSON, then check it to get a formatted result.

Your result appears here after a successful check.

Content is processed in this page's memory. Your source is not sent to a processing server.

How to check and format JSON

Paste JSON, check its syntax and duplicate keys, then copy a more readable result. The original text of large integers and decimals is preserved. Other software may handle their precision differently.

  1. Paste your JSON source and choose two-space formatting or compact one-line output.
  2. Choose “Check and format”. If there is an error, correct the indicated line and column, then check again.
  3. Copy the result or download formatted.json, encoded as UTF-8 without a BOM.
Size, structure and interoperability limits
  • Input: up to 262,144 UTF-8 bytes (256 KiB). UTF-16 length is checked first, with a 262,144 code-unit limit.
  • Up to 50,000 tokens, including punctuation and excluding whitespace. Up to 64 nested container levels.
  • A raw string token, including quotes, can contain up to 65,536 UTF-16 code units. A number token can contain up to 4,096.
  • Output: up to 4,194,304 UTF-8 bytes (4 MiB). Processing stops after 5 seconds. Limits never produce a partial result.
  • One complete JSON value is required. Scalar roots are accepted. Comments, trailing commas, BOMs, duplicate keys and unpaired Unicode surrogates are rejected.

Line and column numbers start at 1; offsets start at 0. Columns count UTF-16 code units. CRLF is one line break. Schema validation, JSON5 and automatic repair are not provided.

Frequently asked questions

Will long numbers change?

Only whitespace between tokens changes. Numbers are not converted to JavaScript Number, so spellings such as -0, 1.2300, 1e400 and large integers remain intact. This does not guarantee that other software can use them precisely.

Why are duplicate keys rejected?

Different software may keep different entries. This tool stops instead, so you can choose which entry to keep in your source. Keys are compared as exact decoded strings, without trimming, case conversion or Unicode normalization.

Are comments or trailing commas supported?

No. This tool accepts strict JSON within the stated limits and does not guess how to repair it.

Is my JSON saved?

Content stays in this page's memory. Reloading does not restore it, and source and results are not written to the URL or browser storage. Loading the website still requests HTML, CSS and program resources. Your work is not sent to a processing server.

“Clear all” removes content held by this page, stops work and restores the default format. It cannot retract downloaded files or clipboard contents, or physically erase underlying memory. Processing works offline after loading. Reopening the site offline after closing it is not guaranteed.