Paste raw or minified JSON to format, validate, and highlight syntax errors. The tool runs entirely in your browser - nothing is sent to a server.
Format, validate and repair: errors listed with line, column and a fix.
Runs in your browserFixed automatically
Ctrl+Z in the input brings the original back.
How to use
Format JSON: paste raw or compact JSON and click Format JSON. The result is indented, highlighted and numbered by line; Copy takes it as plain text.
Minify: turns formatted JSON into a single line, ready for a variable, a command-line argument or an API call.
Sort keys: formats the JSON with the keys of every object in alphabetical order, at every level. Arrays keep their order. Use it to compare two versions of the same configuration file or API response.
Validate: invalid input gets a list of every error the tool can find, not only the first one. Each error shows its line and column, the lines around it, a pointer to the character, and a code such as trailing-comma. Go to error puts the cursor on the selected error in the input, and Why this happens and how to avoid it opens the matching section of JSON errors explained.
Fix automatically: appears when the input contains mistakes that can be repaired without guessing: trailing commas, single and curly quotes, comments, Python True, False and None, single backslashes in Windows paths, and = or a missing colon after a key when the fix is unambiguous. You get the repaired JSON and a list of what was changed. Missing commas, missing brackets and other structural errors are never guessed; they stay for you to fix.
Example, Share link and keyboard: Example loads a realistic sample. Share link copies a link that opens the tool with the same JSON. The data travels after the # in the address, so it is not sent to our server, but anyone who has the link can read it: remove passwords and tokens before sharing. Ctrl+Enter repeats the last action, Esc clears the tool.
Example
Input - compact JSON from an API response:
{"name":"John","roles":["admin","user"],"active":true}
Output after formatting:
{
"name": "John",
"roles": [
"admin",
"user"
],
"active": true
}
When do sysadmins use a JSON formatter
JSON appears constantly in sysadmin and DevOps work - API responses, Azure and AWS resource configurations, log entries, Terraform output, and PowerShell objects serialized with ConvertTo-Json. In most of these contexts the JSON arrives compact and unreadable.
A formatter lets you quickly inspect the structure, find a specific key, or verify that a configuration block is correct before applying it. The minify direction is equally useful: when passing JSON as a command-line argument or storing it in a variable, whitespace causes problems and a single-line compact form is required.
FAQ
What is JSON?
JSON (JavaScript Object Notation) is a lightweight text format for storing and exchanging structured data. It uses key-value pairs and supports strings, numbers, booleans, arrays, and nested objects.
JSON is the dominant data format for REST APIs, configuration files, and infrastructure tooling. It is easy to read by humans and straightforward to parse by machines.
Why is my JSON invalid?
Common causes:
- Trailing comma after the last item -
{"key": "value",}is not valid JSON - Single quotes instead of double quotes - JSON requires
"double quotes"for keys and string values - Unquoted keys -
{key: "value"}is invalid; must be{"key": "value"} - Missing comma between two items in an object or array
- Comments - standard JSON does not support
// commentsor/* block comments */
The tool lists every error with its line and column and links each one to its section in JSON errors explained, which covers 23 error types with examples and the exact messages Python, Chrome, jq and PowerShell show for them.
What does formatting JSON do?
Formatting (also called pretty-printing) takes compressed or minified JSON and adds consistent indentation and line breaks to make the structure readable.
For example, {"a":1,"b":[1,2,3]} becomes a properly indented multi-line block. This makes it easier to read, debug, and compare payloads from APIs, logs, or configuration files.
What is the difference between JSON and JSONC?
JSONC (JSON with Comments) is an extended format that allows // and /* */ comments. It is used by tools like VS Code for configuration files such as settings.json and tsconfig.json.
Standard JSON does not support comments. If you paste JSONC into a standard JSON parser it will fail at the first comment. Click Fix automatically to remove them, and keep the comments in the original file if the application that reads it supports JSONC.
What is JSON used for in IT?
JSON is used across modern IT infrastructure:
- REST APIs - request and response bodies in virtually every web service
- Configuration files - VS Code, ESLint, Terraform, Ansible, package.json
- Log files - structured logging in applications and cloud platforms
- Databases - PostgreSQL, MongoDB, and Elasticsearch store and query JSON natively
- Infrastructure as Code - AWS CloudFormation, Azure Resource Manager templates
- PowerShell -
ConvertTo-JsonandConvertFrom-Jsonfor working with APIs and config
Why does my JSON work in PowerShell but fail here?
ConvertFrom-Json in PowerShell 7 is a forgiving reader: it accepts trailing commas, single quotes, keys without quotes, comments and tabs inside strings, none of which standard JSON allows. Applications, Azure deployments, Python and most APIs read JSON strictly, the way this tool does.
To check a file strictly from PowerShell, use Test-Json instead of ConvertFrom-Json. The full comparison is in It works in PowerShell but the application rejects it.
My file is valid here, but Python rejects it. Why?
Most often the file starts with a UTF-8 byte order mark (BOM). Browsers, and this tool, ignore a BOM at the very start, so the JSON shows as valid with a warning. Python fails with Unexpected UTF-8 BOM, and many Linux tools reject it too.
Save the file as UTF-8 without BOM. Windows PowerShell 5.1 adds a BOM with Out-File and Set-Content -Encoding UTF8; see Byte order mark for the commands that avoid it.
Is the JSON I paste sent anywhere?
No. Formatting, validation and repair run entirely in your browser; nothing you paste is uploaded. A share link keeps the JSON after the # in the address, a part that browsers never send to the server, but the link itself contains the data, so treat it like the data.
Related guides and tools
Related guides
- JSON errors explained: what each message means and how to fix it - every error this formatter reports, with the messages Python, Chrome, jq and PowerShell show for the same mistake
- CI/CD Pipelines: What They Are and Why You Should Care - where this fits in an automated pipeline
- Base64 encoding explained: how it works and when to use it - what base64 actually does and when it is the right choice
Other tools
- Base64 Encoder and Decoder - encode and decode Base64 strings directly in the browser
- Hash Generator - generate MD5, SHA-1, SHA-256 hashes from any text input
- Unix Timestamp Converter - convert between Unix timestamps and human-readable dates
- IP Subnet Calculator - calculate subnet ranges, broadcast addresses, and host counts
Useful links
- JSON dummy data - large sample JSON files for testing formatters and parsers