A modern, interactive JSON tree visualizer built with Next.js and TypeScript
Live Demo • Report Bug • Request Feature
- 🎨 Beautiful Dark/Light Theme - Seamlessly switch between dark and light modes with smooth transitions
- 🌲 Interactive Tree Visualization - Visualize complex JSON structures as hierarchical trees
- 🔍 JSON Path Search - Search and highlight specific nodes using JSON path notation
- 📤 File Upload - Import JSON files directly from your system
- 💾 Export Options - Download visualizations as PNG images or JSON files
- 🔄 Real-time Parsing - Instant validation and tree generation
- 🎯 Zoom Controls - Zoom in/out and fit the entire tree to view
- 📋 Sample Data - Pre-loaded example to get started quickly
- ⚡ Fast & Responsive - Built with Next.js 16 and React 19 for optimal performance
- 🎭 Smooth Animations - Powered by Framer Motion for delightful user experience
- Framework: Next.js 16 with App Router
- Language: TypeScript
- Styling: Tailwind CSS 4
- UI Components: Radix UI
- Animations: Framer Motion
- Theme Management: next-themes
- Icons: Lucide React
- Visualization: React Flow
- Node.js 20.x or higher
- npm, yarn, pnpm, or bun
git clone https://github.com/royanish0410/JsonVista.git
cd JsonVistanpm install
# or
yarn install
# or
pnpm install
# or
bun installnpm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 in your browser to see the application.
- Type or Paste: Enter JSON directly into the input textarea
- Upload File: Click "Upload JSON" to import a
.jsonfile - Use Sample: Start with the pre-loaded example data
- Click the "Generate Tree" button to visualize your JSON structure
- Invalid JSON will display helpful error messages
- Search: Use JSON path notation (e.g.,
$.user.address.city) to find specific nodes - Theme Toggle: Switch between dark and light modes using the sun/moon icon
- Zoom: Use zoom controls to adjust the view
- Export: Download the visualization as PNG or export the JSON data
- Clear: Remove all data and reset the visualizer
- Copy: Copy formatted JSON to clipboard
JsonVista/
├── app/
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout with metadata
│ └── page.tsx # Main page component
├── components/
│ ├── ui/ # Radix UI components
│ ├── json-tree-visualizer.tsx # Main visualizer component
│ └── theme-provider.tsx # Theme context provider
├── lib/
│ ├── json-utils.ts # JSON parsing and utilities
│ └── utils.ts # Helper functions
├── public/ # Static assets
├── package.json # Dependencies and scripts
└── tsconfig.json # TypeScript configuration
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm start |
Start production server |
npm run lint |
Run ESLint |
The main component that handles:
- JSON input and validation
- Tree structure generation
- Search functionality
- Export capabilities
- Theme management
Renders the hierarchical structure with:
- Collapsible nodes
- Type indicators (object, array, primitive)
- Path highlighting
- Smooth animations
The project uses Tailwind CSS with custom theme configuration. You can customize colors, fonts, and spacing in:
app/globals.css- CSS variables and base stylestailwind.config.ts- Tailwind configurationcomponents.json- Component theme settings
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
Anish Roy - @royanish0410
Project Link: https://github.com/royanish0410/JsonVista
Live Demo: https://json-vista.vercel.app
Made with ❤️ by Anish Roy
⭐ Star this repository if you find it helpful!