calculatory.app

JSON Formatter & Validator

Paste JSON to pretty-print, minify, and validate it instantly. Errors show exactly where parsing failed.

Waiting for input

Indent

0 bytes0 keys

How this tool works

Validation and formatting both run through the browser's built-in JSON.parse() and JSON.stringify() — the same parser every JavaScript engine uses, so a document that validates here will parse identically in Node.js, a browser, or any JSON-compliant library. If parsing fails, the error message from the parser (which includes the character position of the problem) is shown directly rather than a generic "invalid JSON" message.

Common questions

What does 'valid JSON' actually mean?

Valid JSON follows a strict grammar: object keys must be double-quoted strings, string values must use double quotes (not single), trailing commas after the last item are not allowed, and only six value types exist — string, number, boolean, null, object, and array. JavaScript is more permissive than JSON; code that works as a JS object literal often isn't valid JSON.

Why does my JSON fail validation when it looks fine?

The most common causes: single quotes instead of double quotes around strings or keys, a trailing comma after the last item in an object or array, an unquoted key, or a stray comment (JSON doesn't support comments at all, unlike JSON5 or JSONC). This tool's error message includes the position where parsing failed, which is usually right at or just after the actual problem.

What's the difference between formatting and minifying?

Formatting (pretty-printing) adds indentation and line breaks so JSON is readable by a human — useful when debugging or reviewing an API response. Minifying strips all unnecessary whitespace to produce the smallest possible size — useful for production payloads or storing JSON in a constrained space, since whitespace has zero effect on how JSON parsers interpret the data.

Is my JSON data sent anywhere when I use this tool?

No — parsing, formatting, and validation all happen using JSON.parse() and JSON.stringify() directly in your browser via JavaScript. Nothing is uploaded or transmitted, which matters if you're working with real API responses or data that might contain sensitive information.

Can this tool handle very large JSON files?

It can handle typical API responses and config files without issue, but extremely large payloads (multiple megabytes) may feel sluggish since the whole string is parsed and re-rendered in the browser at once. For very large files, a command-line tool like jq is usually a better fit than a browser-based formatter.

Gaurav Yadav

Built by Gaurav Yadav

Designer, author, and the one person behind Calculatory. All parsing runs in your browser — nothing is sent to a server. More about the project.

Last updated: September 2026