JSON Formatter and Validator: Private, in Your Browser
Format, validate and minify JSON.
Paste JSON and it is laid out again as you type, with two or four spaces, tabs, or on a single line. If it isn’t valid, the line and column of the first problem are shown. Keys can be sorted alphabetically at every depth, which makes two versions of a file easier to compare. JSON often holds tokens, customer records and configuration, so this formatter does its work on your device.
How to use JSON formatter
- Paste JSON into the JSON field, or open a text file.
- Choose an Indent of 2 or 4 spaces, Tab or Minify, and turn on Sort keys to put keys in alphabetical order.
- Press Copy result, or Download the formatted JSON.
JSON formatter: common questions
Is my JSON sent to a server when I format it?
No. Hoglet’s JSON formatter parses and lays out the JSON in your browser, on your device, and makes no request with it, so tokens, customer records and configuration stay with you. It works offline too.
Does the JSON formatter accept comments or trailing commas?
No. The JSON formatter reads strict JSON, as JSON.parse does, so a comment, a trailing comma or a single-quoted string is an error, shown with the line and column where the JSON stops being valid.
Does sorting keys in the JSON formatter change the order of arrays?
No. Sort keys puts the keys of every object in alphabetical order, at every depth, which makes two versions of a file easier to compare. Arrays keep their items in the order they had.
Everything stays on your device. Nothing is uploaded. Works offline once your first visit has stored the app.