Format/validate JSON — JSON formatter and viewer
Paste an API response or config file to format it instantly, with a collapsible tree view too. Content never leaves your browser, so it's safe to use even with a response that contains tokens.
The file is never sent to a server — processed entirely in this browser
JSON is processed entirely in your browser and never sent anywhere. Integers larger than 2^53 may have their last digits altered due to JavaScript's number limits.
Advertisement
How to use Format/validate JSON
- 1Paste JSON, or open a .json file.
- 2Choose indentation (2 spaces, 4 spaces, tab), minification, or key sorting, and the result updates instantly.
- 3If there's an error, its location and cause are shown. Copy the result or save it as a file.
Frequently asked questions
Does this work with very large JSON?
Files up to several dozen MB are usually fine. The tree view can be slow for large files, so it starts collapsed.
Large numbers come out different.
JavaScript numbers can't precisely hold integers larger than 2^53 (about 9 quadrillion). It's safer to treat very large IDs as strings.
What about JSON with comments or trailing commas?
Standard JSON doesn't allow comments or trailing commas, so these show as errors. The line number is shown — remove it and check again.
Advertisement