How to use it
- Paste JSON into the input box, upload a .json file, or drop a file onto it.
- Pick 2 spaces, 4 spaces or tabs. Tick “Sort keys” to order every object alphabetically.
- Copy the result or download it as a .json file.
Good to know
- Sorting keys makes two JSON files much easier to compare in a diff tool.
- Formatting never changes your values: numbers, strings and nesting stay exactly the same.
About JSON
JSON (JavaScript Object Notation) stores data as nested objects and arrays. It is the standard format for web APIs and the config files of most JavaScript projects.
Questions
- Is my data uploaded anywhere?
- No. Everything runs in your browser with JavaScript. What you type or paste never leaves your device.
- What makes JSON invalid?
- Usually a trailing comma, a missing comma between items, single quotes, unquoted keys, or comments. The error message shows the line and column of the first problem.