JSON stays on this device. Validation, minifying, key sorting, string escaping, downloads, and the tree view run locally in your browser.

Input

Output

Formatted output will appear here.

JSON tree

Collapsible preview for valid JSON

Prettify, validate, or paste JSON to inspect it as a tree.

JSON Formatter

Paste or import JSON above and click Prettify to reformat it with consistent indentation and spacing — free, in your browser, with nothing uploaded to a server. Powered by Prettier.

Validation notes

JSON does not allow trailing commas, comments, unquoted keys, or single-quoted strings. Duplicate keys are accepted by JavaScript parsers, but the last value wins when parsed.

Large files

Formatting runs locally and works best for files your browser can comfortably hold in memory. For very large JSON, minify first only if you need a compact copy.

Other formatters

Need to convert Markdown instead? Try the free Markdown to Word/HTML/PDF converter.

Need to run some numbers? Try the free online calculators.

Frequently asked questions

How do I format JSON online?+

Paste JSON and use Prettify, Minify, Validate, Sort keys, or the JSON string escape tools. Valid JSON can also be inspected in the collapsible tree view.

Does it show where invalid JSON failed?+

Yes. The validator reports a best-effort line and column for syntax errors, including common issues like trailing commas.

Is my JSON uploaded or stored anywhere?+

No. Formatting, validation, minifying, key sorting, string escaping, copying, and downloads run entirely in your browser.

More formatters

JavaScript formatter · TypeScript formatter · CSS formatter · YAML formatter · C formatter · C++ formatter · VBScript formatter

We use cookies to show ads via Google AdSense. See our Privacy Policy for details.