JSON Formatter & Validator
Paste or type JSON below. The tool checks the syntax as you type; click Format for two-space indentation or Minify for a compact single line.
Invalid JSON
🚀 Advertise on CollateKit
Reach developers using productivity tools every day. Your advertisement could appear here.
You might also need
Compare two versions of a JSON file side by side and see exactly what changed.
Decode Base64 JSON payloads back to plain text or encode JSON for transport.
Strip stray spaces, tabs and blank lines from copied text before you parse it.
Generate UUID v4 IDs for test fixtures, sample records and API requests.
Turn Markdown documentation and examples into clean HTML.
Convert text and field names between uppercase, lowercase, camelCase, and more.
Measure angles on screen or upload photos to measure angles from images.
About this tool
The JSON Formatter & Validator turns compact or uneven JSON into readable, properly indented output. Paste into the JSON Input box and the tool checks the syntax on every keystroke. Click Format to rewrite the input with two-space indentation and line breaks, or Minify to collapse it back to a single line with no optional whitespace. Both actions rewrite the text in the same input box, so there is no separate output pane to copy from.
Formatting and minifying are the only transformation options. The indent width is fixed at two spaces, and there is no indent selector, download button or JSON Schema validation. Copy copies whatever is currently in the input box, and Clear resets the input, error panel and counters. When the JSON is valid, the stats bar reports total Keys including nested keys, the number of Lines in the two-space formatted result, and that result's Character count. The validity indicator turns green and reads Valid JSON. Invalid input turns it red and shows an error panel.
Developers use it to inspect API responses and log payloads, QA engineers use it to check test fixtures, and data analysts use it to read exported JSON before loading it elsewhere. If a response arrives as a Base64 string, decode Base64 JSON payloads first. To see what changed between two revisions of a config file, compare two versions of a JSON file after formatting both. When the text around a copied payload has stray spaces or blank lines, strip stray spaces before parsing it. When you need realistic records, create unique IDs with our UUID Generator and drop them into your JSON fixtures.
Validation here is JSON syntax validation: it catches malformed JSON, but it does not check values against a schema or required-field rules. For schema validation, use a dedicated JSON Schema validator after confirming the JSON parses. Everything runs locally in your browser; the text is never uploaded, stored or sent to a server, and there is no signup or install. That makes the tool safe for private API responses, internal configuration and unreleased data.
How to use
- 1Paste or type your JSON into the JSON Input box.
- 2Watch the validity indicator. If the JSON is invalid, the error panel shows the parser's message with a line and column.
- 3Click Format for two-space indentation, or Minify to collapse the JSON onto one line.
- 4Check the Keys, Lines and Characters counters to confirm the size and structure of the result.
- 5Click Copy to put the current input on your clipboard, or Clear to reset everything.
Example
This compact object formats into the indented version on the right. The stats bar then reports Keys 4, Lines 9 and Characters 105.
{"name":"CollateKit","version":1,"tags":["json","formatter"],"active":true}{
"name": "CollateKit",
"version": 1,
"tags": [
"json",
"formatter"
],
"active": true
}Invalid JSON example
{"a": 1,}Invalid JSON
Line 1, Column 9 — Expected double-quoted property name in JSON at position 8 (line 1 column 9)The exact wording comes from your browser's JSON parser; the tool adds the line and column. If you have the previous version of the file, compare two versions of a JSON file to see what changed before fixing the error.
Common JSON errors
- Trailing comma — remove the comma before a closing
}or]. - Single quotes — use double quotes around every key and string value instead of single quotes.
- Unquoted keys — wrap every object key in double quotes.
- Missing bracket — add the missing
}or]so every object and array is closed.
Common uses
- Debugging API responses — paste the response, format it, and fix the line and column shown by the error panel. If the payload is Base64-encoded, decode Base64 JSON payloads first.
- Cleaning config files — format a config before editing, then compare two versions of a JSON file to review the exact changes.
- Checking JSON before deployment — validate the final payload here before shipping, and re-check it after any last-minute edit. If you keep a previous release, compare the two versions to catch accidental changes.
- Sharing readable data — format the JSON and copy it into a ticket or document. When the notes around it need a rendered page, convert Markdown to HTML.