Skip to content
GAMETROZ

JSON Formatter & Validator

Format, minify and validate JSON, with the line and column of any error.

Processed locally in your browser.

About JSON Formatter & Validator

API responses, config files and log lines often arrive as one unreadable line. Format turns them into indented JSON you can scan, and Minify squeezes them back down for transport or storage.

Validate checks the syntax against the JSON specification and points to the first problem: a trailing comma, a single-quoted string, a missing colon. Values are never rewritten, so large numbers, number formats and key order stay exactly as you wrote them.

How to use JSON Formatter & Validator

  1. 1Paste your JSON into the input box.
  2. 2Choose Format, Minify or Validate.
  3. 3If the JSON is invalid, read the error: it names the line, the column and what was expected.
  4. 4Fix the problem and run it again, then copy the result.

Examples

Input

{"tool":"json-formatter","free":true,"limits":[1,2]}

Result

{
  "tool": "json-formatter",
  "free": true,
  "limits": [
    1,
    2
  ]
}
Formatted with 2 spaces.

Input

{"name": "Gametroz", "tags": ["games", "tools",]}

Result

Line 1, column 48: Trailing comma is not allowed in JSON
JSON does not allow a comma after the last item.

Frequently asked questions

Why is my JSON invalid when it works in JavaScript?

JSON is stricter than JavaScript object syntax. Keys and strings need double quotes, trailing commas are not allowed, and comments, undefined and single quotes are not part of the format.

Does formatting change my data?

No. Only whitespace changes. Numbers, strings, key order and duplicate keys are kept exactly as written, which matters for IDs larger than 9,007,199,254,740,991.

Is there a size limit?

There is no fixed limit, but everything runs in your browser, so very large files (tens of megabytes) may feel slow on a phone. Nesting deeper than 256 levels is rejected.

Guides

Tools guide

How to Format, Minify and Validate JSON

Make messy JSON readable, shrink it again for production, and find the exact line and column of a syntax error, with the five mistakes behind most failures.

· 3 min read

Tools guide

What Is a Unix Timestamp?

A Unix timestamp counts the seconds since January 1, 1970 UTC. Learn seconds versus milliseconds, time zones, the year 2038 issue and how to convert one.

· 3 min read

Tools guide

Best Free Online Developer Tools

A tour of the free developer and generator tools in the Gametroz catalog: JSON, Base64, URL, timestamps, hashes, UUIDs, passwords, QR codes and more.

· 3 min read