JSON Tree Viewer

Free online JSON tree viewer and visualizer. Explore JSON data with interactive collapsible tree structure, syntax highlighting, search, and fullscreen mode. Perfect for analyzing complex JSON APIs, debugging nested data, and understanding JSON structures.

Input JSON
clearClearpastePaste
Tree View
tree

Paste your JSON here...

JSON Tree Viewer - Interactive JSON Data Explorer & Visualizer

A powerful online JSON tree viewer that helps you visualize, explore, and understand complex JSON data structures. Features an interactive collapsible tree interface, syntax highlighting, real-time search, path copying, fullscreen mode, and customizable view options. Perfect for developers, API testers, data analysts, and anyone working with nested JSON data.

Why is my JSON invalid even though it looks correct?

The most common culprits are trailing commas, unquoted keys, single quotes, and stray comments — all valid in JavaScript but forbidden by the JSON specification (RFC 8259). Strict JSON requires double-quoted keys and strings, no comma after the last item in an array or object, and no comments of any kind. Other frequent errors include using unescaped backslashes inside strings (write \\ for a single backslash), unescaped control characters like a raw newline, and copying "smart quotes" (“”) from a word processor instead of straight quotes (""). This viewer surfaces the first parse error with the exact line and column so you can jump straight to the offending character. If you need to consume non-strict input from a config file, paste it into a JSON5 or relaxed-JSON converter first, then run the cleaned output through this tree viewer.

What is the difference between JSON objects and arrays in the tree view?

JSON has two container types and the viewer marks them differently. Objects are unordered collections of named members and appear as {} with key:value pairs; the viewer shows the key name in a distinct color and the spec guarantees no key order. Arrays are ordered sequences and appear as [] with numeric indices 0, 1, 2 …; order is meaningful and must be preserved. Inside either container you may nest any value type: string, number, boolean, null, another object, or another array. Use objects when each element has a stable identifier and arrays when items are interchangeable or ordered. Mixing the two is normal: an array of objects is the canonical shape for tabular data, and an object whose values are arrays is the canonical shape for grouped data.

How do I expand or collapse all nodes at once?

Use the Expand All and Collapse All controls at the top of the tree. Expand All recursively opens every object and array down to leaf values — useful when you want to scan the entire document or feed it into a screen reader. Collapse All shows only the top-level keys, which is much faster to scan on large payloads. To open a single branch without revealing its children, click directly on the disclosure triangle next to that node; hold Alt (or Option on macOS) and click to toggle that node plus all its descendants at once. The current expansion state is preserved while you search, so a hit inside a collapsed branch will auto-expand only the path needed to reveal it.

Does this viewer handle UTF-8 BOM and other character encoding issues?

Yes. The parser strips a leading UTF-8 byte-order mark (the bytes EF BB BF, often added by Windows tools and some Java exports) before parsing, so a BOM-prefixed file will not cause a syntax error here. JSON itself is required by RFC 8259 to be encoded in UTF-8, UTF-16, or UTF-32, with UTF-8 strongly recommended for interchange. If you paste UTF-16 text from the clipboard the browser will already have decoded it, so you rarely need to worry. The viewer also displays escape sequences correctly: \u00e9 renders as é, surrogate pairs like \uD83D\uDE00 render as a single emoji 😀, and \n is displayed as a literal newline inside string values rather than wrapping the layout.

JSON Tree Viewer — Free online JSON tree viewer and visualizer. Explore JSON data with interactive collapsible tree structure, syntax highl
JSON Tree Viewer

What do escape sequences like \u00e9, \n, \t, and \/ actually mean?

These are the six string escapes defined by JSON. \" inserts a double quote, \\ inserts a backslash, \/ inserts a forward slash (legal but optional — the slash never needs to be escaped to parse, only to embed JSON inside an HTML <script> tag), \b \f \n \r \t insert the ASCII control characters backspace, form feed, newline, carriage return, and tab, and \uXXXX inserts the Unicode code point with hex value XXXX. For code points above U+FFFF, JSON uses UTF-16 surrogate pairs: \uD83D\uDE00 encodes the grinning-face emoji U+1F600. Any other backslash escape (for example \x41 or \0) is a syntax error in strict JSON, even though many languages accept those forms in their own string literals.

How do I query a deeply nested value with JSONPath or a similar expression?

JSONPath ($ for root, .key for child, [n] for array index, .. for recursive descent, [?(@.field=='x')] for filter) and JMESPath (a stricter superset with multiselect lists and projections) are the two dominant query languages for JSON. They let you write expressions like $.store.book[?(@.price < 10)].title to extract the title of every book under 10 dollars without writing imperative code. This tree viewer focuses on browsing rather than querying, so to evaluate a JSONPath expression open our dedicated JSON Path Finder tool, paste the same document, and type the expression. For programmatic use, libraries exist in every major language: jsonpath-plus and JMESPath.js in JavaScript, jsonpath-ng and jmespath in Python, and the built-in JSON_TABLE function in modern SQL engines.

What is the largest JSON file I can paste into the viewer without locking up the browser?

Browsers can usually parse JSON up to roughly 50 MB on a desktop machine, but rendering a tree with millions of nodes is what actually freezes the UI. As a rough rule of thumb, plan for under 5 MB or under 100 000 leaf values for a smooth interactive experience; beyond that the viewer uses virtualised rendering so only visible nodes are drawn. For files larger than 100 MB you should stream the data with a SAX-style parser instead of loading the whole document into memory: ijson in Python, JSONStream in Node, or Jackson Streaming API in Java will let you walk the document one event at a time and process records as they arrive. For truly massive datasets, switch the storage format to NDJSON (one JSON value per line) or Parquet so you can read and filter without ever materialising the full document.

Why do large numbers like 9007199254740993 display incorrectly?

JSON allows any decimal number with arbitrary precision, but JavaScript parses every number into a 64-bit IEEE 754 double, which can represent integers exactly only up to 2^53 − 1 = 9 007 199 254 740 991 (the value of Number.MAX_SAFE_INTEGER). Larger values silently round to the nearest representable double, so 9007199254740993 becomes 9007199254740992. This bites anyone using JSON to transport database IDs, Twitter snowflake IDs, blockchain values, or nanosecond timestamps. The standard workaround is to quote large numbers as strings ("id": "9007199254740993") and parse them with BigInt or a decimal library on the receiving side. JSON5 and some streaming parsers offer a "use BigInt for integers beyond safe range" option, but plain browser JSON.parse does not, so always check whether your producer is quoting big integers before relying on equality comparisons.

Key Features

  • Interactive collapsible tree structure for easy navigation
  • Syntax highlighting with color-coded data types
  • Expand all / collapse all for bulk operations
  • Expand to specific levels (1, 2, 3, or all)
  • Real-time search to find keys and values
  • Copy JSON path to any node (dot notation)
  • Copy individual values to clipboard
  • Show/hide data types for clearer view
  • Show/hide array indices
  • Fullscreen mode for large JSON structures
  • Dark mode support with theme toggle
  • Format minified or unformatted JSON
  • Load sample JSON for testing
  • Handles deeply nested objects and arrays
  • Visual indicators for objects, arrays, and primitives
  • Responsive design for mobile and desktop
  • 100% client-side - your data never leaves your browser
  • Works offline after initial load
  • No file size limits
  • Fast rendering even for large JSON files