json-viewer Tailwind Templates

Json Viewer

A modern JSON viewer and formatter with syntax highlighting, dark mode, and multi-language support. Built with Next.js 15 and Tailwind CSS.

JSON Viewer

A modern and beautiful JSON viewer and formatter built with Next.js and Tailwind CSS. View, edit, and format JSON with syntax highlighting and a simplified view.

JSON Viewer Screenshot

Features

  • ๐ŸŽจ Beautiful Syntax Highlighting: Color-coded JSON for better readability
  • ๐Ÿ‘€ Simplified View: A clean, easy-to-read view of your JSON data
  • ๐ŸŒ“ Dark/Light Mode: Switch between themes for comfortable viewing
  • ๐ŸŒ Multi-language Support: Available in:
    • English
    • Spanish
    • French
    • German
    • Portuguese
  • ๐Ÿ“ JSON Formatting: Automatically format and validate your JSON
  • ๐Ÿ“ค Export: Save your formatted JSON to a file
  • ๐Ÿ“ File Upload: Drag & drop or select JSON files to load
  • ๐Ÿงน Clear Function: Easily clear the editor content

Technologies Used

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository:

    git clone https://github.com/JairoMS27/json-viewer.git
    cd json-viewer
    
  2. Install dependencies:

    npm install
    # or
    yarn install
    
  3. Run the development server:

    npm run dev
    # or
    yarn dev
    
  4. Open http://localhost:3000 with your browser to see the result.

Usage

  1. Input JSON:

    • Paste your JSON directly into the editor
    • Click the upload button to select a JSON file
    • Drag & drop a JSON file directly into the editor
  2. Format: Click the "Format JSON" button to automatically format your JSON

  3. View: See the formatted JSON with syntax highlighting on the left and a simplified view on the right

  4. Export: Click "Export JSON" to save your formatted JSON to a file

  5. Theme: Toggle between light and dark mode using the theme switcher

  6. Language: Select your preferred language from the language dropdown

๐ŸŒ Netlify Deployment

This project is optimized for Netlify deployment with performance best practices.

  1. Project Preparation

    • Ensure your project is in a Git repository (GitHub, GitLab, etc.)
    • Project is configured for static builds with output: 'standalone'
  2. Netlify Setup

    • Connect your repository to Netlify
    • Build settings will be automatically configured via netlify.toml
    • Default configuration includes:
      • Build command: npm run build
      • Publish directory: .next
      • Optimized caching
      • Asset compression
      • Security headers

๐Ÿ“œ Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run linter

โšก Performance Optimizations

  • Aggressive caching strategies
  • Automatic image optimization
  • JS and CSS minification
  • Static asset compression
  • Security headers
  • SEO optimizations

๐Ÿ”’ Security Features

  • XSS protection
  • Content Security Policy
  • Strict MIME type checking
  • Frame protection
  • Referrer Policy

Author

Acknowledgments

๐Ÿ“„ License

This project is licensed under the MIT License.

Top categories

Loading Svelte Themes