JSON Formatter & Validator
Format, minify and validate JSON instantly with a fast, private browser-based developer tool.
Format and validate JSON online
Paste JSON into the input box to pretty-print it with readable indentation, minify it for compact storage, or validate its syntax.
How to use the JSON formatter
- Paste your JSON into the input field.
- Choose 2 spaces, 4 spaces or tabs.
- Select Format to prettify or Minify to compress.
- Copy the result when finished.
Private developer utility
Parsing and formatting happen in JavaScript inside your browser. Your JSON does not need to be sent to Utivaro for processing.
A formatting example you can check
Paste {"order":9007199254740993,"items":["box","label"]}, choose 2 spaces and select Format. The output becomes easier to read while the long order number stays exactly as entered. Minify removes the extra whitespace again.
Formatting is different from changing data
This formatter preserves the original number tokens, including large integers and exponent notation. It does not sort keys, convert dates or repair invalid JSON. A trailing comma, comment or single-quoted key must be corrected first. Validate checks syntax, not an API schema or whether the values are correct.
Duplicate object keys are preserved, but applications may interpret them differently. Resolve duplicates before using the document in production. For an encoded text payload, use the Base64 decoder first, then validate the decoded JSON here.
Frequently Asked Questions
What does a JSON formatter do?
A JSON formatter adds indentation and line breaks to valid JSON so nested objects and arrays are easier to read.
Can this tool validate JSON?
Yes. Select Validate to check whether the input can be parsed as valid JSON.
Can I minify JSON?
Yes. The Minify action removes unnecessary whitespace from valid JSON.
Is my JSON uploaded to a server?
No. Formatting and validation are performed locally in your browser.
Common errors and what causes them
These are the messages Chrome and Node.js show for typical mistakes.
| Invalid JSON | Error message | Fix |
|---|---|---|
{"a": 1,} | Expected double-quoted property name | Remove the trailing comma |
{'a': 1} | Expected property name or '}' | Use double quotes |
{"a": 1 "b": 2} | Expected ',' or '}' after property value | Add the missing comma |
{"a": NaN} | Unexpected token 'N' | Use null or a number |
| An HTML page instead of JSON | Unexpected token '<' | Check the API URL and status code |
The reported position often points just after the real mistake, so look at the character before it. All twelve common errors are in Common JSON Errors and How to Fix Them.