JSON Formatter, Validator & Minifier

Paste JSON (or JSON-LD) and format it pretty, minify it tiny, or validate with an exact error location when it fails. Everything runs in your browser; nothing is uploaded.
Developer Utility
A missing comma that would take 15 minutes to find in a 400-line schema takes 2 seconds here.
JSON parse errors in schema markup, GA4 configs, GTM data layers, and API payloads all have one thing in common: a trailing comma, a missing bracket, or a stray quote. This tool shows you exactly where. Also handles JSON escape/unescape and dedupe-sort of arrays.
Input + output
Input 0 chars
Output 0 chars
Next steps
If you're working with Schema.org JSON-LD, validate it against the spec
The Schema Markup Validator checks every type against schema.org and Google rich result requirements.
Frequently asked questions
What does this tool do?
Formats, minifies, validates, and escapes JSON. Shows exact error line + column on parse failure.
What is the difference between JSON and JavaScript objects?
JSON keys must be double-quoted strings. Values must be strings, numbers, booleans, null, arrays, or objects. No functions, dates, undefined, or trailing commas.
Why does my JSON have "unexpected token" errors?
Usually trailing commas, single quotes, unquoted keys, or an unescaped backslash. The error line + column shows exactly where.
What is JSON5?
A superset of JSON allowing comments, trailing commas, unquoted keys. Not valid standard JSON. Use JSON5.parse() if you need it.
How large a document can the tool handle?
Up to about 20MB in-browser. Larger files are better validated via jq or a command-line parser.
Does the tool store my JSON?
No. Everything runs in your browser. Nothing uploaded.
How do I escape a string for JSON?
Backslashes before quotes, newlines (\n), tabs (\t), control characters. The tool's Escape mode does this automatically.
What is JSON-LD?
JSON for Linking Data: JSON with schema.org context, used for semantic markup. See the JSON-LD Pretty Printer for a schema-aware formatter.
Can I diff two JSON documents?
Not with this tool. Use the Text Diff Checker after formatting both.
How do I handle large nested structures?
Pretty-print with 2-space indent, then use browser Find to navigate. Collapse-friendly editors (VS Code) handle multi-megabyte JSON well.
Does the formatter preserve key order?
Yes by default. The "sort keys" option sorts alphabetically: useful for diffing.
Free · no account

SEORCE for Chrome, Edge and Firefox

Audits the page you are on: headings, meta tags, schema, indexability, and whether AI crawlers can read it. Export the result as a PDF. Free, with no account.

It audits one page at a time and does not track AI answers. About the extension

Across the whole site

One check here. Every page in SEORCE.

This tool does one job. SEORCE Technical Suite crawls your whole site with fast and secure crawlers and ranks technical issues by impact. AutoFix applies fixes for meta tags, schema, canonical tags, image alt text, headings and internal links for orphan pages on your live site, through one script tag, and the list keeps growing.
3,000+ users · Free forever plan, no card needed