JSON Formatter

Format and validate JSON in your browser. Large integers keep every digit.

Added 2026-10-23

What it does

JSON Formatter pretty-prints and checks JSON in this browser tab. Integers larger than 9007199254740991 (2^53 - 1) keep every digit, so an id such as 12345678901234567890 is not rounded the way JSON.parse would round it. Invalid JSON stops at the parser error instead of guessing a repair. The page does not evaluate the data, call a server, or make a large integer safe for arithmetic later. Any JSON.parse in application code still uses JavaScript numbers. Use it to inspect and reformat text. If the value must survive math, store it as a string.

How to use it

  1. Paste JSON into the input.
  2. The formatted result appears below. Invalid JSON shows the parser error.
  3. Copy the result. The input stays in this tab and is not sent anywhere.

Common mistakes

  • Trailing comma. JSON does not allow a comma after the last item. Remove it.

Parsing and formatting run locally in your browser, including inside a worker for larger inputs.

Related guides

  • One JSON object per JSONL line

    OpenAI messages JSONL needs one object per line, a messages array, and an assistant message. A blank line is not an example.

  • JSON integers past 2^53

    Why JSON.parse rounds large integers, and how to keep every digit when you only need to format JSON.

Related tools