JSON Formatter & Validator
Validate, format, search and convert JSON locally with precise errors and downloadable output.
Your result
About this tool
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.
Use this tool step by step
- Paste JSON or import a supported local text file, then format it and inspect any reported error location. Keep the original data while you review repairs.
- Search the formatted document or choose a supported export. Validate the result against the schema or API that will consume it; syntactically valid JSON can still contain the wrong fields or values.
How it 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.
Example workflow
{"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.
Find and fix a JSON error by line and column
Paste JSON into the document field and select the Format JSON button. The first syntax error points to a line and column in the pasted text. Check the preceding line as well. The parser may stop at the next property or closing brace.
For example, in a four-line object with an opening brace, a “sku” property, a “quantity” property and a closing brace, leave out the comma after the “sku” value. With two spaces before each property, the validator reports CommaExpected at line 3, column 3. Put the comma after the “sku” value on line 2.
With a comma after the final “quantity” value and the closing brace at the start of line 4, the validator reports PropertyNameExpected at line 4, column 1. Remove the trailing comma on line 3. Run the formatter again to check whether another error remains.
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.
Sources and editorial responsibility
Maintained by Renvoro Pty Ltd. Sources inform the methods and assumptions shown here; outputs have the limitations described on this page.
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.
Guide updated 2026-11-19. Calculation method and source dates remain separate.
Method reviewed 2026-10-08. Calculation standards · Report an issue