JSON Formatter & Validator
Validate strict JSON, locate syntax errors, search a path/value listing and format or minify without uploading the document. Convert an object array to CSV, or export YAML and a generic XML representation.
Your result
How the calculation works
Validation rejects comments and trailing commas. Beautification changes whitespace while preserving numeric lexemes. Minification removes whitespace outside strings. Conversion parses into browser values; integers outside the exact safe range and nonfinite browser numbers are rejected before conversion.
Worked example
{"items":[{"sku":"A","quantity":2},{"sku":"B","quantity":3}]} is valid JSON. For CSV, choose path items: the exported columns are sku and quantity, with rows A,2 and B,3.
Assumptions and limitations
Maximum pasted input is 262,144 characters (local file import is capped at 256 KiB), 100 nesting levels and 500 displayed search nodes. The path selector supports simple property/index paths, not full JSONPath. Duplicate keys are flagged; conversions reject them because downstream interpretation is ambiguous. XML uses root/item tags and a key attribute for invalid XML names.
Format first to inspect the structure. Use the optional path only for conversions, such as items or items[0].sku. Generated output is capped at 1 MiB, with a 100,000-cell CSV limit. CSV treats nested values as JSON strings and neutralizes spreadsheet formula prefixes. Keep backups: exports are conversions, not schema validation.
Common questions
Why is a large integer conversion refused?
JavaScript cannot exactly represent every integer above 2^53 − 1. Formatting preserves the original number text; conversion would risk changing it.
Is JSON with comments supported?
No. This validator uses strict JSON syntax, so comments and trailing commas produce a location-specific error.
Method reviewed 2026-10-08. Calculation standards · Report an issue