JSON Formatter & Validator
Format, validate and inspect JSON in your browser. Precise error positions, one-click repair and a collapsible tree view. Your data never leaves the tab.
About this tool
Paste JSON and get it formatted, validated and explorable straight away. When something is wrong, you get the exact line and column, a caret under the offending character and an explanation in plain English — not just "unexpected token". Most common breakages can be fixed with a single click.
When you would use it
- Making a minified API response readable while debugging
- Finding the one missing comma in a 3,000-line configuration file
- Checking a payload is valid before pasting it into a request
Worked example
{"id":4815,"name":"Ada","roles":["admin","editor"],"active":true}
{
"id": 4815,
"name": "Ada",
"roles": [
"admin",
"editor"
],
"active": true
}
Things worth knowing
- Formatting preserves key order by default; sorting is a separate, explicit action.
- Duplicate keys are reported rather than silently collapsed — the later value wins in every JSON parser, which is rarely what you intended.
- Numbers are re-emitted from their parsed value, so
1.0becomes1. Use a string if you need to preserve exact formatting.
Frequently asked
Why does my JSON say "unexpected token" somewhere that looks fine?
What does the Repair button fix?
NaN, undefined, unclosed brackets, JSONP callback wrappers and double-encoded JSON. It works on the token stream rather than with regular expressions, so string contents are never corrupted.Can it handle JSON with comments?
Is my data uploaded anywhere?
Is there a size limit on the JSON I can format?
Does it work offline?
Tools that pair well with this
Start with the tools people reach for most
JSON Validator
Validate JSON and get the exact line, column and cause of every syntax error, with a one-click repair.
JSON Viewer
Explore JSON as a collapsible tree.
JSON to CSV
Convert JSON to CSV online, free and instantly.
JSON to TypeScript
Generate TypeScript types from JSON instantly.
JSON Diff
Compare two JSON documents structurally.
JSON Minify
Strip every unnecessary byte from JSON — whitespace, newlines and indentation — in one step.
XML Formatter
Format and beautify XML with consistent indentation.
YAML Validator
Validate YAML and get the exact line and cause of every error.
183 tools, grouped by what they do
Formatters, validators, converters and code generators for the formats developers actually wrangle. Every one of them runs in your browser.
JSON tools
Everything for reading and fixing JSON — formatting, validating with precise error positions, exploring large payloads as a tree, and repairing the malformed documents that APIs actually return.
18 toolsConverters
Move data between the formats that configuration files, APIs and spreadsheets speak. Each converter states plainly what survives the trip and what cannot.
14 toolsCode generators
Paste a representative response and get types you can compile. The inference merges every object in an array, so a field missing from one item becomes optional rather than silently required.
57 toolsFormatters
Make unreadable code readable. Every formatter is token-aware, so strings, comments, regular expressions and template literals survive untouched.
23 toolsXML tools
A full XML workbench: pretty-printing with namespace-safe output, well-formedness validation that names the mismatched tag, and conversion into every other format here.
7 toolsYAML tools
YAML fails in quiet ways: a stray tab, a Norway-problem boolean, an over-indented block. These tools surface those before your pipeline does.
4 toolsCSV tools
Proper RFC 4180 handling — quoted fields, embedded commas and newlines, doubled quotes — plus delimiter sniffing so pasted data usually just works.
2 toolsCSS tools
Format, compress, and move between preprocessor dialects. Conversions translate syntax — variables, nesting and structure — rather than compiling your stylesheet.
25 toolsEncoders
Unicode-safe by construction: everything routes through UTF-8 bytes rather than the browser primitives that mangle anything outside Latin-1.
14 toolsEscapers
Every escaper here round-trips exactly — including backslashes, newlines and emoji, which is where most escaping tools quietly corrupt your data.
16 toolsUtilities
The small things: diffing two documents, transforming strings, inspecting data URIs.
3 toolsYour data stays yours
Every tool runs as JavaScript in your tab. Nothing is uploaded, logged or stored. Open the network tab and watch — or pull the plug and keep working.
Built for real payloads
Large documents are parsed in a background worker, so the interface never freezes. There is no upload limit because there is no upload.
Errors that tell you something
Line, column, a caret under the offending character and an explanation of the rule that broke — plus one-click repair for the fixable cases.