87 · Productivity

JSON Formatter & Validator

Paste JSON to make it readable, check it’s valid, or squash it onto one line. Your data never leaves your browser.

JSON Formatter & Validator

How to use the json formatter & validator

  1. Paste your JSON.
  2. Choose an indent, or Minify to remove all whitespace.
  3. Tick Sort keys to order object keys alphabetically, which makes two files easier to compare.
  4. If the JSON is invalid, the error shows the line and column to fix.

Common JSON errors

  • Trailing commas after the last item: [1, 2,].
  • Single quotes — JSON needs double quotes around strings and keys.
  • Unquoted keys like {name: "x"}, which are valid JavaScript but not JSON.
  • Comments, which JSON doesn’t allow.

Examples

{"name":"CapyHelp","free":true}

Formatted across four lines with 2-space indents

{"a":1,}

Invalid JSON (line 1, column 8)

Questions

Is my JSON uploaded?

No. Parsing and formatting happen entirely in your browser, so it’s safe for API responses that contain private data.

How big a file can it handle?

Several megabytes is fine on most devices.

Does sorting keys change my data?

Only the order of keys in objects. Array order is never changed, and JSON doesn’t treat key order as meaningful.