JSON Formatter

Format, validate and minify JSON in your browser, with error line and column.

Everything runs in your browser - your JSON is never uploaded.

JSON formatter, validator and minifier

Paste JSON and press Format to get clean, indented output, or Minify to strip whitespace for smaller payloads. If the JSON is invalid the tool tells you what is wrong and where, with a line and column, so you can fix a missing comma or quote quickly.

Common JSON errors

  • Trailing commas after the last item, which JSON does not allow.
  • Single quotes instead of double quotes around keys and strings.
  • Unquoted keys, such as {name: "a"}.
  • Comments, which are not part of the JSON standard.
  • A missing closing bracket or brace.

Format versus minify

Formatted JSON is easier for people to read and compare. Minified JSON is smaller, which helps for API responses and stored configuration. The data is identical either way.

Private by design

Parsing happens entirely in your browser using the built-in JSON engine, so tokens, customer data or configuration you paste are never sent to a server.

Câu hỏi thường gặp

How do I validate JSON?

Paste it in and press Format. If it parses, you will see Valid JSON; if not, the error message points to the problem position.

Why does my JSON with single quotes fail?

The JSON standard requires double quotes for keys and strings. Replace single quotes with double quotes.

Does sorting keys change my data?

Only the order of keys in objects changes. Arrays keep their order and values are unchanged.

Is there a size limit?

There is no fixed limit, but very large files (tens of megabytes) may slow your browser.

Xem thêm trong Converters & Utilities