Skip to main content
Develop Tools
← Return to usage guide

JSON Tree Viewer | Complete guide to usage, settings, and troubleshooting

Even if duplicate keys can be read, parsers differ in whether they use the first, last, or all pairs. Check the tree warning and both values, then make the producer side unique.

Diagram of a JSON Tree Viewer warning about duplicate keys in the same Object
Diagram of a JSON Tree Viewer warning about duplicate keys in the same Object

Inspect JSON structure in a Tree

Paste JSON or load a file, expand only the required branches, and check keys, values, and paths.

Open JSON Tree Viewer

Conclusion: Review warnings, consolidate into one choice, and make it unique

Because Tree Viewer retains duplicate Pairs and shows a warning, you can inspect the state before overwriting. In production, check the meaning and consolidate them into one, then validate with the Parser used by the destination.

JavaScript JSON.parse and similar APIs generally retain the later value. Seeing both in a Tree does not necessarily mean both are retained by the Consumer.

Object containing duplicate keys

{"role":"viewer","role":"admin","enabled":true}

role appears twice in the same Object. In the Tree, check both Pairs and the duplicate warning.

Isolate the source of duplication

Check manual edits, template expansion, object merges, and concatenation of multiple configurations.

Check pointsway of seeingjudgment
positionIs it the same parent object?Same names at different hierarchy levels are not duplicates.
ValuesBoth types and contentsDecide on an integration policy.
Where to useParser behaviorCheck overwrites and rejection

Procedure for investigating duplicate keys

  • 1. Display the JSON as a tree and check warnings.
  • 2. Open the warned object and check the pair with the same name.
  • 3. Check the specification and source generator to determine which to adopt.
  • 4. Correct it to be unique, then revalidate with the formatter and destination.

Read the types of Objects, Arrays, and values in a tree.

DisplayMeaning in JSONPoints to check
{n}An Object with n membersKey names and parent-child relationships
[n]An Array with n elementsZero-based indexes and element order
string / numberString or numberWhether quotes are present and the original numeric representation
boolean / nulltrue / false or nullDistinguish from the strings "true" and "null".

The current tool can display JSON rooted not only in objects and arrays, but also strings, numbers, booleans, and null. Empty {} and [] are also treated as valid JSON.

Use search, expand, and collapse appropriately

ActionsCurrent supportWhen to use it
Search targetAll, keys, values, and pathsNarrow candidates by keys or values with the same name.
Matching methodPartial match, exact match, and case sensitivitySearch accurately for known names
Move candidatesPrevious/next, automatically expand ancestors and array rangesCheck matching locations in order
Display rangeInitial depth 0–10, expand all, collapse allRender only required branches into the DOM.

Regular expression search is not supported. Arrays are grouped into range nodes for every 100 elements, but this is not virtual scrolling that reuses only rows visible on screen.

Do not confuse JSON Pointer with generated paths

Representationexamplerole
JSON Pointer/orders/0/idPoints to one location based on RFC 6901
Generate JSONPath$.orders[0].idClearly show the position of the selected node
JSONPath query$.orders[?(@.active)]An expression that searches for multiple nodes matching the condition

JSON Tree Viewer generates and copies the selected node's Pointer and JSONPath-like location expression. It is not a search engine that evaluates JSONPath expressions, so use JSONPath Tester to verify filters and wildcards.

In a Pointer, escape ~ in a key as ~0 and / as ~1. Do not manually abbreviate the displayed value; share it as is.

Separate the roles of JSON Formatter and Tree Viewer

purposeTools to useConfirmation details
Syntax error location, indentation, and minificationJSON Formatter(tools/converters/json-formatter.html)Format text
Hierarchy, type, parent, and node pathJSON Tree ViewerFollow the structure by collapsing it
Create a data specificationJSON Schema Generator(tools/generators/json-schema-generator.html)Turn types and required candidates into a schema
Check before and after changes.Text diff comparison (tools/comparators/diff-viewer.html)Compare changes by line and character

Formatting and tree view are not competing features. First confirm that it can be read as strict JSON, then inspect the target branch in the tree and copy only the selected node if necessary.

Handle large JSON and confidential information safely

  • Parsing runs in a Web Worker, and deep hierarchies are processed with an explicit Stack. Searches also return control to the UI after a fixed number of results.
  • Closed branches do not render child elements into the DOM, and arrays are grouped in units of 100 elements. However, parse results for all nodes are retained in memory.
  • Show a confirmation message for files over 10 MB. This is not a fixed full-support limit; it is constrained by device memory and browser limitations.
  • Input JSON, file contents, and search terms are not sent to or stored on the server. Only display settings such as theme and text size are stored in localStorage.

JSON containing authentication tokens or personal information can leak through screen sharing, the clipboard, or downloaded files. Replace values with the JSON masking tool before sharing.

What the current JSON Tree Viewer can and cannot do

ItemCurrent supportUnsupported features and notes
InputPaste, .json file, drag & dropNo URL fetching or automatic Clipboard reading
JSONObject, Array, Primitive, empty structures, and duplicate key warningsJSONL, JSONC, comments, and trailing commas are unsupported
ViewingInitial depth, individual expansion, expand/collapse all, and array ranges in blocks of 100 itemsNo row virtualization or editing
searchAll, keys, values, and paths; partial or exact match; case sensitivityNo regular expression or JSONPath expression evaluation
DetailsType, parent, depth, child count, JSON Pointer, and generated JSONPathThere is no breadcrumb-style editing UI.
outputCopy the entire JSON, keys, values, pointers, paths, and selected nodes, and save nodesThere is no separate Pretty display tab.

Check the specification using primary sources

RFC 8259 defines JSON grammar, RFC 6901 defines location references, and RFC 9535 defines JSONPath queries. Evaluate tool-specific display names separately from standard specifications.

An example where role is duplicated during settings merge

Concatenating base settings and environment settings creates duplicates.

Merge as an Object and test the intended overwrite rules.

  1. Check both values
  2. Identify the generation process
  3. Confirm that warnings disappear after the fix
  4. Record results together with paths, types, and warnings.

Some implementations reject duplicate keys as syntax errors.

Frequently asked questions

Are duplicate keys always an error under the JSON specification?
It may be accepted syntactically, but RFC 8259 recommends unique Object names, and behavior is not interoperable.
Does the Tree Viewer retain only later values?
Do not leave them. Preserve and display the Pair, and show a warning.