Paste your JSON to format, minify, or validate it instantly. Syntax highlighting included.
Click "Format" or "Minify" to see the output...
Powered by Ubikon Technologies | All processing happens in your browser. No data is sent to any server.
The JSON Formatter takes the JSON text you paste in and runs it through your browser's built-in JSON parser. "Format" re-prints the parsed data with 2-space indentation so nested objects and arrays are easy to read; "Minify" re-prints it with no extra whitespace to produce the smallest possible string. Because both actions require the input to parse successfully first, either button also tells you whether the JSON is valid — if it is not, the exact parser error (with the problem token) is shown instead of any output.
Input — minified, one line
{"name":"Ubikon Technologies","type":"agency","services":["web","mobile","ai"],"founded":2020,"active":true,"address":null}Output — after clicking "Format"
{
"name": "Ubikon Technologies",
"type": "agency",
"services": [
"web",
"mobile",
"ai"
],
"founded": 2020,
"active": true,
"address": null
}What does the JSON Formatter actually do?
It parses the JSON you paste with JSON.parse and re-serializes it: "Format" calls JSON.stringify with 2-space indentation, "Minify" calls JSON.stringify with no spacing to produce a single-line string. If the input is not valid JSON, JSON.parse throws and the tool shows that error message directly — it does not guess at a fix.
Does it validate JSON, or just format it?
Both, as the same step. Formatting and minifying both require a successful JSON.parse first, so clicking either button is also a validity check. An invalid document never produces output — you get the parser's error message (e.g. "Unexpected token") instead.
Is my JSON uploaded anywhere?
No. Parsing, formatting, and syntax highlighting all run in your browser with the built-in JSON object — nothing you paste in leaves the page or is sent to a server.
Why are some values colored differently in the output?
The formatted output is syntax-highlighted: object keys, strings, numbers, booleans, and null are each tokenized with a regular expression and rendered in a different color so the structure is easier to scan at a glance.