Skip to main content

Handy tools

JSON Formatter & Validator

Pretty-print JSON with 4-space indentation and validate it in your browser, with the error's line and column when it's invalid.

Paste your JSON and hit Format to pretty-print it with 4-space indentation and check that it's valid. Everything runs in your browser — nothing is uploaded.

JSON inputTip: Ctrl / ⌘ + Enter formats too.
Formatted outputClick Format to see your JSON indented with 4 spaces.
Your formatted JSON will show up here.

Recommended Content

Paste minified or messy JSON, click Format (or press Ctrl/⌘ + Enter), and the tool re-indents it with 4 spaces and line breaks so nested objects and arrays are easy to read. It parses your input with the browser's built-in JSON parser, so the same click also validates it: if something is wrong, you get the line and column of the problem (when your browser reports one) along with the browser's original error message. The result can be copied in one click.

Parsing and formatting run entirely in your browser; the JSON you paste is never sent to a server, which makes it safe for API responses or config files that contain tokens. The validator follows standard JSON strictly, so comments, trailing commas, single quotes and other JSON5 syntax are reported as errors. Keep in mind that the output is regenerated from the parsed data: integers larger than 9,007,199,254,740,991 lose precision, duplicate keys keep only the last value, and a number like 1.0 becomes 1. This page formats and validates only; it does not minify, sort keys or show a tree view.

Frequently Asked Questions

  • Q. Is my JSON sent to a server?

    A. No. Parsing and formatting happen locally in your browser with its built-in JSON parser, and the text you paste is never uploaded.

  • Q. How do I find where my JSON is broken?

    A. Click Format. If the JSON is invalid, the tool shows the line and column of the error when your browser reports a position, plus the browser's own message, such as "Expected ',' or '}' after property value".

  • Q. Can it read JSON with comments or trailing commas?

    A. No. It follows standard JSON (RFC 8259), so comments, trailing commas, single-quoted strings and unquoted keys are flagged as errors. Remove them and format again.

  • Q. Will formatting change my data?

    A. The structure and values stay the same, but the output is rebuilt from the parsed data: integers beyond 9,007,199,254,740,991 are rounded, only the last of duplicate keys is kept, 1.0 and 1e3 are written as 1 and 1000, and integer-like keys such as "2" move ahead of the other keys.