JSON Formatter

Parse and validate JSON; format, minify, recursively sort keys, and add or remove string escapes.

Local browser processing
User Guide

How to use JSON Formatter

Local browser processing

Example

JSON input

{"name":"11dz-tools","items":[1,2,3]}

Result

{
  "name": "11dz-tools",
  "items": [
    1,
    2,
    3
  ]
}
  1. Format

    Paste JSON and choose indentation before formatting. Minify removes formatting whitespace; validate only checks syntax.

  2. Validate

    Property names and strings must use double quotes. Single quotes, comments, trailing commas, undefined, NaN and Infinity are unsupported.

Limitations and Notes

  • Formatting and key sorting retain the original number text. Store long identifiers that are not for calculations as strings.
  • JSON document cannot exceed 1 MiB.

FAQ

What if the input contains comments or trailing commas?

Text with comments or trailing commas can use JSON Cleanup; validate the cleaned result again.

Page feedbackFound an issue or have suggestions for improvement?
Feedback features need to be used in the online version

Please enable JavaScript in the online version before submitting; local features of the current tool or example are not affected.

Go to the online version for feedback