Skip to content
All tools

Free tool

JSON Formatter & Validator

Format, validate, and minify your JSON. Catch syntax errors with line numbers and download the results.

Indent:
0 characters
0 lines
0 B size

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data interchange format. People can read and write it by hand. Machines parse and generate it just as easily.

Reading a JSON syntax error

Paste any JSON, such as an API response or a config file, into the box above. The formatter checks it with your browser’s own JSON parser. It returns the document indented with 2 spaces, 4 spaces or tabs, or minified to one line. On a syntax error it shows the parser’s message and, where the browser reports a position, the line and column.

A common error is a trailing comma after the last item, which JavaScript object literals allow and JSON rejects. The reported position usually lands on the closing bracket, so look one character back for the comma. Analytics event payloads are JSON too, and formatting one makes it easy to check that a property such as price holds a number rather than a quoted string.

Why format JSON?

  • •Readability: Proper indentation makes data structures clear
  • •Debugging: Spot errors and understand data quickly
  • •Documentation: Clean JSON for API examples

Common JSON errors

  • •Trailing commas: Not allowed after the last item
  • •Single quotes: JSON requires double quotes
  • •Unquoted keys: Object keys must be quoted
  • •Comments: Standard JSON does not support comments

Building developer onboarding?

Skene generates onboarding checklists from your codebase.

Learn more