JSON Formatter & Validator
Raw JSON from an API, a config file or a log line is rarely readable as it arrives. Paste it here and it comes back with calm, consistent indentation that exposes the real structure — or, if something is wrong, a precise pointer to the first character the parser choked on, with its line and column.
How to use it
- Drop your JSON into the input box, or press Load sample to see the tool in action.
- Pick an indent style — 2 spaces, 4 spaces or tabs.
- Press Format for a readable version, Minify for a single line, or Validate to check correctness only.
- Copy the result. If you got an error instead, jump to the reported line and column and fix the character there.
Key facts
- Parsing uses the JSON engine built into your browser — the same one web pages themselves rely on.
- Error messages include the character position plus its line and column, not just "invalid JSON".
- Formatting only ever changes whitespace. Keys, key order, values and types come through untouched.
About this tool
Raw JSON from an API, a config file or a log line is rarely readable as it arrives. Paste it here and it comes back with calm, consistent indentation that exposes the real structure — or, if something is wrong, a precise pointer to the first character the parser choked on, with its line and column.
The work is done by the JSON parser built into your own browser, on your own machine. Nothing is uploaded or stored, so payloads with tokens, internal API responses and other material you would never hand to a server-side formatter are safe to work with here.
Like every TextKit tool, the JSON Formatter & Validator runs entirely on your device. There is no account, no upload and no record of the content you process — close the tab and everything is gone.
Frequently asked questions
Where does my JSON go when I click Format?
Nowhere. The formatter runs as JavaScript inside this browser tab. Disconnect from the network entirely and it keeps working — there is no server receiving your input.
What do the line and column in an error message mean?
They point at the first character the parser could not make sense of. In practice the culprit sits at or just before that spot: a trailing comma, an unescaped quote, a bracket that never closed.
Can formatting change or lose my data?
No. Format and Minify rewrite whitespace only. The parsed value — every key, value and type — is serialized back exactly; minifying simply removes the whitespace again.
What is the difference between Format, Minify and Validate?
Format pretty-prints with your chosen indentation, Minify compresses everything onto one line, and Validate checks correctness without producing output — handy when you only need a yes/no answer.
Related tools
JSON to CSV Converter
Convert a JSON array of objects into a tidy CSV, header row and quoting included.
~/tool/base64-encode-decodeBase64 Encode / Decode
Encode text to Base64 or decode it back, with full Unicode support.
~/tool/url-encode-decodeURL Encode / Decode
Percent-encode text for URLs, or decode percent-encoded strings back.