JSON Formatter

Format, validate, minify and sort JSON with tree view

Use the interactive tool with JavaScript enabled.

How to use it

  1. Paste JSON or open a local JSON file up to 10 MB.
  2. Choose Format, Minify, Sort Keys, or Tree. Use Ctrl+Enter or Cmd+Enter to format.
  3. Copy the full result or download it as a JSON file.

Example

Input

{"name":"Ada","active":true}

Output

{
  "name": "Ada",
  "active": true
}

Behavior and limits

Uses JavaScript JSON number precision. Tree previews show at most 200 children per container and use a total node budget; the full formatted result remains available to copy or download. Large results use plain text instead of syntax colors.

About this tool

The JSON Formatter validates and pretty-prints JSON with syntax highlighting and an interactive tree view. Paste any JSON to instantly spot syntax errors, sort keys alphabetically, or collapse deeply nested structures. Switch to minify mode to compress JSON for APIs or storage. Processing runs locally in your browser. Use sample or redacted data when debugging configurations, API responses, or authentication flows.

Questions and answers

Can I format large JSON files?
You can open local files up to 10 MB. Larger pasted inputs depend on browser memory. Tree previews are capped and syntax coloring is disabled for large output; copying and downloading still use the full result.
Can I validate against a JSON Schema?
The JSON Formatter validates basic JSON syntax. For full JSON Schema validation against a schema document, use the JSON Schema Validator tool.

Related tools

Sources and specifications

Tool processing runs in your browser. Privacy policy and cookie preferences.

Read this guide as Markdown