JSON Validator
Check if JSON is valid and see the exact line and column of any error, with a hint on how to fix it. A free online JSON validator in your browser.
Format JSON online: beautify messy JSON with 2 or 4 spaces or tabs, sort keys, minify it to one line and find errors. Free, runs in your browser.
Runs in your browser. Your data never leaves your device.
Paste JSON from an API, a log or a config file and press Format to get clean, indented JSON that is easy to read. Choose 2 spaces, 4 spaces or tabs, sort the keys A to Z, or press Minify to put the JSON back on one line for sending or storing. If the JSON has a mistake, the formatter shows the line and column. Your data stays in your browser, which matters when the JSON holds tokens or customer details.
JSON (JavaScript Object Notation) is text with a few strict rules: objects in curly braces with keys in double quotes, arrays in square brackets, and values that are strings, numbers, true, false, null, objects or arrays. There are no comments and no trailing commas. Formatting only adds spaces and line breaks; the data stays exactly the same. An example:
{
"id": 1024,
"name": "Wireless Mouse",
"price": 19.99,
"inStock": true,
"tags": ["usb", "office"],
"seller": { "name": "Acme", "rating": 4.6 }
} VS Code formats a .json file with Format Document (Shift+Alt+F on Windows, Shift+Option+F on a Mac). Notepad++ needs a plugin: open Plugins > Plugins Admin, install JSON Viewer, then use Plugins > JSON Viewer > Format JSON. On a computer or server with Python, json.tool beautifies a file, and jq does it with colours if you have it installed.
python3 -m json.tool data.json # beautify with 4 spaces
python3 -m json.tool --indent 2 data.json # beautify with 2 spaces
jq . data.json # beautify with jq
jq -c . data.json # minify to one line Firefox shows a JSON address as a readable, collapsible view by itself, and browser extensions add a JSON viewer to Chrome. To compare two JSON files, format both here with Sort keys ticked and put them side by side in any diff tool, such as Compare Selected in VS Code: with the keys in the same order, only the real differences stand out. There's nothing to download; the formatter works in any browser, on a phone too.
GuideHow to Self-Host n8n on a Cheap VPS (Docker Compose with HTTPS)
Open the file, copy its text into the box above and press Format, then press download to save the formatted .json file. In VS Code, open the file and use Format Document.
A text format for data made of objects ({ }), arrays ([ ]) and values: strings in double quotes, numbers, true, false and null. Web APIs and config files use it everywhere.
Yes. Beautifying only adds indentation and line breaks, so the data doesn't change. Minify removes them again.
Yes, with a plugin. Install JSON Viewer from Plugins > Plugins Admin, then choose Plugins > JSON Viewer > Format JSON.
Format adds spaces and line breaks for people to read. Minify removes them to make the file as small as possible for sending or storing.
No. Formatting happens in your browser.
Check if JSON is valid and see the exact line and column of any error, with a hint on how to fix it. A free online JSON validator in your browser.
Paste JSON and get Kotlin data classes for Android, with kotlinx.serialization, Gson or Moshi names, nullable fields and defaults. Free, in your browser.
Convert JSON to null-safe Dart model classes for Flutter, with fromJson, toJson and an optional copyWith. Free, no sign-up, runs in your browser.
Turn JSON into Swift Codable structs or classes, with CodingKeys for snake_case keys. Free JSON to Swift converter for iOS and macOS apps.