JSON Formatter and Validator Online
JSON (JavaScript Object Notation) is the standard data format for APIs, config files, and data exchange. Paste minified or messy JSON here to format it with proper indentation, validate the syntax, or explore nested structures in the tree view. Catches trailing commas, missing brackets, and unquoted keys as you type.
How to Use
- Paste JSON into the input editor on the left
- Format or Minify using the buttons in the toolbar
- View the output as formatted text or switch to Tree view
- Adjust indentation with the dropdown (2 spaces, 4 spaces, or tabs)
- Copy the formatted result with one click
Features
Syntax Highlighting
The editor provides full JSON syntax highlighting powered by CodeMirror 6, with bracket matching, line numbers, and active line highlighting. The dark theme is designed for comfortable reading.
Real Time Validation
JSON is validated as you type. Errors are shown with descriptive messages and position information, so you can quickly find and fix issues like missing commas, unclosed brackets, or invalid values.
Tree View
The interactive tree view lets you expand and collapse objects and arrays to explore deeply nested structures. Values are color coded by type: strings in green, numbers in blue, booleans in orange, and null in gray.
Minification
The minify function removes all whitespace from valid JSON, producing the most compact representation. This is useful when you need to reduce payload size for API requests or storage.
Decoded a JWT and want to inspect the payload? The JWT Decoder extracts the JSON, and you can paste it here to format or explore the claims in the tree view. If you need to send JSON as a query parameter, run the minified output through the URL Encoder first.