Skip to content
dashutils

JSON Formatter & Validator

Paste JSON to pretty-print it, find syntax errors with exact line and column, browse it as a collapsible tree, sort keys or minify it.

  • Free, no sign-up
  • Runs locally in your browser
Loading tool…

Your files are processed on this device and are never uploaded to a server.

How to use the JSON Formatter & Validator

  1. 1

    Paste JSON or open a .json file.

  2. 2

    Choose indentation, then Format, Minify or Sort keys.

  3. 3

    Browse the tree, then copy or download.

Precise error messages

When JSON is invalid the formatter points to the line and column of the problem and explains common causes such as trailing commas, single quotes and unquoted keys.

The errors you'll see most

Most invalid JSON comes from a few habits carried over from JavaScript: a trailing comma after the last item, single quotes instead of double quotes, keys without quotes, comments, and values like undefined or NaN. JSON also has no way to write a literal line break inside a string; it must be \n. The formatter reports the line and column where parsing stopped, which is usually just after the real mistake.

Format, minify or sort

Format adds indentation (2 or 4 spaces, or tabs) so nested data is easy to scan. Minify removes all whitespace for the smallest payload. Sorting keys alphabetically makes two JSON documents easier to compare, for example in the Diff Checker, because properties appear in the same order. The tree view lets you collapse large arrays to find the part you need.

Frequently asked questions

Is my data sent to a server?

No. Everything runs in your browser as you type. Nothing is uploaded or logged, so it is safe to paste API responses, tokens and private text.

Is my JSON uploaded?

No. It's parsed and formatted in your browser, so API responses with tokens or personal data stay on your device.

Why does it say "Unexpected token"?

The parser found a character it didn't expect at that position, typically a quote, comma or bracket problem just before the reported column.

Can it handle large files?

Yes. Files of several megabytes format quickly. For very large documents, collapse the tree to keep the page responsive.

Something not working, or missing a setting you need? Report a problem or request a tool.