Skip to content

debabratasaha-dev/JSON-tree-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌳 JSON Tree Viewer

Paste in any JSON and instantly explore it as a collapsible tree or a live, pannable graph — no install, no build step.

Live No Dependencies


Features

🌲 List View Collapsible tree with syntax highlighting and per-type icons
🕸️ Graph View Responsive mindmap — wheel zoom, pinch zoom, pan, and collapse branches on the fly
🎨 Themes Light / Dark mode toggle
📁 Input Paste JSON directly or upload a .json file
Zero setup Just open index.html — works fully offline

Interactive Mindmap Graph View

The Graph View renders JSON as a responsive mindmap where nested data is shown as connected cards instead of an org chart:

  • Objects and arrays become clickable branches that expand or collapse their children
  • Mouse wheel, trackpad pinch, touch pinch, and the + / - buttons zoom from 0.2x to 3x
  • Mouse drag and touch drag pan freely across the mindmap canvas
  • Smooth SVG connector curves show parent-child relationships between cards
  • Each row shows the key name, value summary, datatype icon, and datatype name
  • Graph cards resize for long strings and adapt to mobile screens without changing the data details
  • The graph redraws after zooming so text remains crisp

It is built with positioned DOM cards, SVG connector curves, and vanilla JavaScript transforms - no canvas, no third-party graph library.


Quick Start

git clone https://github.com/debabratasaha-dev/JSON-tree-viewer.git
cd JSON-tree-viewer
# Open index.html in your browser

Or go here to use it.


How It Works

  1. Paste your JSON or upload a .json file from the left sidebar
  2. Click Render Tree to visualize
  3. Switch between List View and Graph View from the top bar
  4. Use Expand All / Collapse All or click individual nodes to explore

Project Structure

JSON-tree-viewer/
├── index.html   # App shell & layout
├── style.css    # Design system, themes, animations
├── script.js    # Tree & graph rendering, zoom, pan, theme
└── favicon.svg

Contributing

Issues and PRs are welcome! Please open an issue first to discuss any major changes.


Made with ❤️ by Debabrata Saha

About

Interactive JSON visualizer with toggle switch between collapsible tree and mindmap graph views

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors