Valid JSON input
A simple valid object that can be formatted or minified.
{
"name": "Alice",
"roles": ["admin", "editor"]
}Pretty print, minify, escape, unescape, and validate JSON with instant feedback and clear error locations so you can clean and check payloads fast.
Validation Status
Waiting for input
Paste JSON or load a sample to run syntax validation.
Paste raw JSON text. Use "Sample JSON" if you want to test the tool quickly.
Tree view is available in Pretty mode. Expand or collapse nested nodes as needed.
Formatted tree will appear here.
A simple valid object that can be formatted or minified.
{
"name": "Alice",
"roles": ["admin", "editor"]
}Trailing commas are not valid in strict JSON.
{
"name": "Alice",
"age": 30,
}Pretty mode keeps indentation and line breaks for readability.
{
"service": "toolbye",
"status": "ok",
"count": 2
}Minify mode removes non-essential whitespace.
{"service":"toolbye","status":"ok","count":2}Escape mode converts JSON text into embeddable escaped content.
{\"event\":\"page_view\",\"path\":\"/json\",\"meta\":{\"source\":\"toolbye\"}}Unescape mode restores escaped content back to readable JSON text.
{"event":"page_view","path":"/json","meta":{"source":"toolbye"}}JSON does not allow a comma after the last item in an object or array.
JSON keys and string values must use double quotes.
JavaScript-style comments are not part of the JSON specification.
Object properties and array items must be separated by commas.
Special characters in strings must be escaped correctly, such as quotes and backslashes.
This tool uses strict JSON parsing through JSON.parse. It follows the official JSON rules used by most APIs and backend validators.
JSON5 conveniences like comments, trailing commas, and unquoted keys are not accepted here. If your input uses JSON5 features, convert it to strict JSON before formatting.
In the current implementation, JSON parsing and formatting happen in your browser during normal tool usage. The formatter does not require calling a JSON processing API.
Baidu Tongji script is enabled for aggregated visit analytics. JSON parsing and formatting still run locally in your browser.
Validate request and response payloads before sending them to backend services.
Use pretty mode and tree view to inspect deeply nested objects and arrays.
Switch to minify mode when you need lightweight JSON for transport and storage.
Run a quick syntax check before sharing snippets with teammates or documentation.
No. This tool is strict JSON only and rejects JSON5 syntax such as comments and trailing commas.
Common causes include trailing commas, single quotes, missing commas, and invalid escape sequences.
Pretty keeps indentation and line breaks for readability. Minify removes extra whitespace to reduce payload size.
Normal formatting and validation run in your browser in the current implementation.
Yes, but performance depends on your browser and device memory. Extremely large payloads can still be slow.
The parser returns error positions so you can jump directly to the broken part of your JSON.
Minify removes unnecessary whitespace from JSON data. Escape converts text into escaped string content for embedding in code or payloads.
The input is not a valid escaped JSON string. Check quote wrapping and backslash escape sequences before retrying.
Understand core JSON and JSON5 rule differences, and why some payloads fail strict JSON validation.
Quick online JSON checking page to validate syntax and locate format errors fast.
Common JSON error patterns and quick repair steps for invalid payloads.
Convert text and image payloads to and from Base64.
Convert Unix timestamps and date-time values.
Dedicated minifier-focused workflow for large payload cleanup.
Focused validator view with error diagnostics and troubleshooting hints.
Encode or decode URL query strings and parameter values.