Skip to content

Format JSON safely

The JSON formatter parses text locally so you can read it, minify it, or see why it is invalid.

JSON is a text format for structured data. Formatting it adds line breaks and indentation so a person can see the shape. Minifying removes that whitespace so the payload is smaller. Neither step changes the values if the text is valid. Validation is the useful part: a missing comma, a trailing comma, or a single quote where a double quote belongs will fail the parse, and the formatter tells you instead of silently “fixing” the data.

Comments are not part of JSON, even though some configuration files allow them. If a file was written for a looser parser, remove the comments before you expect this tool to accept it. Numbers that are too large for ordinary JavaScript integers can lose precision when they are parsed in a browser. If an identifier must stay exact, keep it as a string in the source.

The formatter does not upload the text. That still does not make a shared or borrowed computer a good place to paste a production token, a private key, or a customer export. Anyone who can see the screen can see the text, and browser extensions on that machine can see it too. Use sample data when you are only trying to understand a structure. Decode a JWT only when you mean to inspect its claims, and remember that the JWT decoder does not check the signature.

Copy and clear controls are on the tool page. There is no account to save a history of what you pasted, and the site does not add a watermark to the formatted text. If you need a structural diff rather than a pretty print, use the diff checker on two versions.

When the text is valid, the tree view is a map of objects and arrays, not a new document. Download or copy the formatted result if you want to keep it. Reloading the page clears the editor.