DevTool Kit

JSON Formatter and Validator

Paste JSON to pretty-print it with two spaces, four spaces or tabs, collapse it to a single minified line, or find out exactly where a syntax error is. Nothing is uploaded.

or choose a file:

Format, minify or validate in one place

Choose an indentation style to beautify a document for reading and diffing, or switch to minify to strip every unnecessary byte before shipping a payload. If you only want to know whether a document is well-formed, paste it and read the status line: valid JSON reports its object, array and value counts along with the maximum nesting depth.

Errors point at a line and a column

Browsers word JSON parse failures differently, so the raw message is rarely enough to find the problem. This tool converts whatever the engine reports into a 1-based line and column and echoes the offending line back to you, which is usually all you need to spot the trailing comma, the unquoted key or the smart quote that broke the document.

Sorted keys make documents comparable

Turn on "sort keys" and every object is rewritten with its keys in alphabetical order, recursively. Two API responses that differ only in key order then produce byte-identical output, so a plain text diff shows only the values that actually changed - handy when comparing environments or reviewing a config change.

Frequently asked questions

Is my JSON uploaded to a server?

No. Nothing you paste leaves your browser. The page loads a small amount of JavaScript, and every calculation happens on your own machine - there is no server to send data to. That is why the tool is safe to use with production payloads, API keys and customer records.

Why does my JSON fail to parse when it looks fine?

The usual culprits are a trailing comma before a closing brace or bracket, single quotes instead of double quotes, unquoted object keys, a typographic quote pasted from a document, or a stray comment. Strict JSON allows none of these. The error message names the line and column so you can go straight to it.

What is the difference between formatting and minifying?

Formatting adds newlines and indentation so a human can read the structure; minifying removes every space and newline so the payload is as small as possible over the wire. Both produce the same data - only the whitespace differs, and JSON parsers treat them identically.

Is there a size limit?

There is no artificial limit. The practical ceiling is your browser's memory: documents of a few megabytes format instantly, and very large files may take a second or two. Because the work is local, no upload time is involved at all.

Related tools

JSON to YAMLYAML to JSONBase64 encodeBase64 decodeURL encode / decodeHTML entitiesJWT decoderHash generator