Tree View to JSON Converter

Convert Unicode box-drawing tree views back into structured JSON format.

JSON output will appear here...

What Is Tree View to JSON Conversion?

Tree views created with Unicode box-drawing characters are a common way to visualize data hierarchies in terminal output, documentation, and code comments. This tool reverses the process, parsing the visual indentation and connectors back into structured JSON. It is ideal for recovering data from visual diagrams, terminal dumps, and documentation examples.

How to Convert Tree View to JSON

  1. Paste your tree view text containing Unicode box-drawing characters (├──, └──, │) and indentation.
  2. Click Convert to JSON to parse the hierarchy. The tool reads indentation levels and connectors to reconstruct the JSON structure.
  3. Copy the resulting JSON for use in your application, data analysis, or as a structured version of your visual diagram.

Frequently Asked Questions

What tree format is supported?

The tool supports trees using standard Unicode box-drawing characters with 2-space indentation levels. Lines starting with ├── and └── indicate child nodes, and │ characters continue vertical lines.

How are values parsed?

Values after colons are parsed as numbers if they are numeric, otherwise they remain as strings. Keys without colons create nested objects.

Can I convert JSON to a tree view?

Yes, use the Swap button to generate a Unicode tree view from your JSON data.

Related Tools