Loading editor…

Tree $

Output initialises when this pane is visible.

Initialising…
0 B idle

How to use

Format, minify, or browse JSON as a tree — all processed locally in your browser.

Quick start get going in seconds
  1. Paste or import JSON into the left pane (or load a sample from the sidebar).
  2. Choose Tree, Format, or toggle Minify in the splitter rail.
  3. Copy, Download, or Apply to push the result back into the input.
Tree, Format & Minify browse or pretty-print

Tree shows a collapsible hierarchy — click nodes to jump to the matching key in the input. Format pretty-prints with 2-space indentation; toggle Minify in the output toolbar for a compact line.

Ctrl/⌘ + T tree  ·  Ctrl/⌘ + S format  ·  Ctrl/⌘ + Shift + M minify

Output actions copy, download, apply
  • Wrap — toggle word-wrap on long lines in the formatted output pane.
  • Apply — replace the input pane with the formatted or minified JSON.
  • Search — use the top bar to find keys and values across tree and code views.
Import & samples files and URLs

Import a .json file, paste from the clipboard, or use From URL when CORS allows.

Need diff, schema validation, or converters? Open JSON Editor Pro for the full workspace.

Features

What this formatter offers — tree view, pretty-print, and minify.

Interactive tree

Browse JSON as a collapsible tree with breadcrumbs, expand/collapse, and search.

Pretty-print

Format JSON with readable 2-space indentation as you type.

Minify

Collapse whitespace into a compact single-line payload for production.

Apply & export

Push output back to the input pane, or copy and download instantly.

100% private

All processing runs in your browser. Nothing is uploaded.

FAQ

Common questions about the JSON formatter.

Is my JSON data safe?

Yes, completely. All processing — parsing, formatting, diffing, schema validation, and transformation — happens entirely inside your browser. Your data is never sent to any server, never stored in the cloud, and never shared. The only persistence is your own browser's localStorage, which you can clear at any time.

Does it work offline?

Yes. Once the page has been loaded and the editor assets are cached, all features work without a network connection. The Monaco editor, AJV validator, and all transform logic run locally. The only time the network is used is to load CDN assets on the very first visit, and optionally when using "Load from URL".

How large a JSON file can I work with?

The editor handles files up to several megabytes comfortably. Above 1 MB, some features like code folding are automatically disabled to keep the editor responsive. For very large files (10 MB+) you may notice slower tree rendering, but formatting, diff, and transform continue to work.

Which JSON Schema drafts are supported?

Draft-07 (default), Draft 2019-09, and Draft 2020-12 — all via AJV. The dialect is auto-detected from the $schema field in your schema document, but you can override it with the dialect chip in the Schema pane. An "Infer from input" button generates a starter schema from your current JSON automatically.

What is TOON format?

TOON (Token-Oriented Object Notation)

TOON (Token-Oriented Object Notation) is an experimental data serialization format designed to be more compact, token-efficient, and easier for AI systems and humans to process compared to traditional formats like JSON.

Core Idea

Traditional formats such as JSON contain a lot of structural punctuation like braces, commas, and quotation marks. TOON-style formats attempt to reduce this syntactic overhead while preserving structured data.

JSON Example

{
  "name": "John",
  "age": 25,
  "skills": ["JS", "Python"]
}

TOON-style Example

name: John
age: 25
skills[
  JS
  Python
]

Why “Token-Oriented”?

Large Language Models (LLMs) process text as tokens. JSON can become verbose because of repeated punctuation and quoted keys. TOON-style formats aim to reduce token usage, making prompts and structured data more compact for AI workflows.

Main Goals

Lower Token Usage

Reduces unnecessary syntax to save prompt space and improve AI context efficiency.

Better Readability

Minimizes clutter from braces, commas, and quotation marks.

Faster Parsing

Some implementations aim for deterministic parsing and lightweight streaming support.

AI-Friendly Structure

Optimized for agent memory, prompt engineering, and structured AI communication.

TOON vs JSON

Feature JSON TOON-style
Standardized Yes Usually Experimental
Verbosity Higher Lower
LLM Efficiency Moderate High
Browser Support Native Limited
Human Readability Good Often Better
Ecosystem Massive Small / Emerging

Important Note

TOON is not currently a universally standardized format. Different implementations may use different syntax rules and parsing strategies. When working with TOON, it is important to define or reference the specific grammar being used.

Related Formats

Potential Use Cases

  • AI Prompt Compression
  • Agent Memory Storage
  • Structured AI Communication
  • Lightweight Config Formats
  • Data Transformation Tools

Can I compare two JSON files that have different key orders?

Yes. Switch to Diff mode (Ctrl/⌘+D) and use the Sort button on each side. Sorting recursively normalises both object-key order and array element order before comparing, so two semantically identical JSONs with shuffled keys will show zero differences.

Other tools

Load JSON from URL

The URL must allow CORS. Plain JSON only.

Paste JSON

Clipboard access denied. Paste your JSON below.