Skip to main content
ZEKILO Dev

JSON Formatter & Validator

Paste JSON and it is formatted right away. Syntax errors are reported with a line and column.

Stays in your browserRFC 8259As of 2026.10.03

Input

Press Esc, then Tab to leave the editor.

Output

How to use JSON Formatter & Validator

  1. 1Paste JSON into the input panel, or press Sample.
  2. 2Choose a mode (Beautify, Minify, Validate only) and an indent. The result updates as you go.
  3. 3Press Copy to copy the result, or Download to save it as a .json file.

JSON Formatter & Validator options

Mode
Beautify breaks lines and indents. Minify removes all whitespace. Validate only prints nothing and just reports whether the JSON is valid, with its type, key count, and depth.
Indent
2 spaces (default), 4 spaces, or a tab. Used in Beautify mode only.
Sort keys
Sorts object keys by Unicode code point. Nested objects are sorted too. The order of array items is never changed.
Escape non-ASCII as \uXXXX
Rewrites non-ASCII characters as \uXXXX escapes. When off (default), strings are kept exactly as written.

The JSON standard and how this tool behaves

This tool reads JSON according to RFC 8259. Syntax that is not in the standard is reported as an error: single quotes, unquoted keys, comments, trailing commas, and NaN, Infinity, or undefined. The top-level value does not have to be an object or an array. "text", 42, and null are valid JSON too.

Columns in error positions are counted in characters (Unicode code points), so the position matches what you see on screen even when emoji or CJK text comes first.

Why numbers are left alone

A JavaScript Number is a 64-bit float and cannot hold integers above 2^53 (9,007,199,254,740,992) exactly. A formatter that reads JSON with JSON.parse and writes it back will silently change the last digits of large integers such as order numbers or snowflake IDs. This tool never computes with numbers. It copies them as text, so beautifying or minifying does not change any value.

JSON Formatter & Validator examples

  • Beautify one-line JSON (defaults: Beautify, 2 spaces)

    The number 1.0 stays 1.0. It is not rewritten as 1.

    Input

    {"name":"ZEKILO","tools":["json","base64"],"version":1.0,"beta":true}

    Output

    {
      "name": "ZEKILO",
      "tools": [
        "json",
        "base64"
      ],
      "version": 1.0,
      "beta": true
    }
  • An integer larger than 2^53

    JSON.parse in JavaScript would turn this value into 12345678901234567000.

    Input

    {"n":12345678901234567890}

    Output

    {
      "n": 12345678901234567890
    }
  • Sort keys + Minify

    Input

    {"b":1,"a":{"d":2,"c":3}}

    Output

    {"a":{"c":3,"d":2},"b":1}
  • Trailing comma error

    Input

    {"a":1,}

    Output

    Line 1, column 8 · A trailing comma is not allowed in JSON.

Examples use the reference cases this tool is tested against.

JSON Formatter & Validator: frequently asked questions

Is my input sent to a server?

No. Your input and the result are processed only in this browser and are not stored. Reloading the page clears them.

Will large numbers be changed?

No. This tool does not use JavaScript's JSON.parse. Numbers are copied character for character, so values such as 12345678901234567890 or 1.0 come out unchanged. If a number would lose precision when read as a JavaScript Number, the tool tells you how many there are.

Does it accept comments or trailing commas?

The JSON standard (RFC 8259) allows neither. This tool follows the standard, reports them as errors, and shows the line, the column, and how to fix them.

What happens when the same key appears twice?

It is not an error, but you get a warning. The standard recommends unique keys, and most parsers keep only the last value, which can cause surprises. Both keys are kept in the output.

How large can the JSON be?

Up to 1 MB is processed as you type. Above that, press Run to process it. The maximum is 20 MB. Large inputs are processed in the background so the page stays responsive.

How it works · Standards

  • Processed in: this browser (your device). Nothing is sent or stored.
  • Standards: RFC 8259
  • Engine: ZEKILO Dev JSON parser and printer (in-house code)
  • Escape sequences inside strings (such as \u00e9) are not decoded. They are kept as written.
  • Empty input is not an error. The output is simply empty.
  • As of 2026.10.03
  • Changelog: 2026.10.03 First release
Open-source licenses →
Something wrong with the result? Report an issue(Your input is not attached)