A lightweight, client-side JSON validation and formatting tool built with Astro, TypeScript, and Tailwind CSS. Features beautiful Catppuccin theming (Mocha/Latte), syntax highlighting, compress/prettify toggle, and responsive design. Inspired by jsonlint.com but with modern styling and enhanced UX.
- Client-side processing - No data leaves your browser
- Beautiful Catppuccin theming - Toggle between Mocha (dark) and Latte (light) themes
- Syntax highlighting - Color-coded JSON output for better readability
- Line numbers - Visual line numbers in the input area for easy error tracking
- Compress/Prettify toggle - Switch between formatted and minified JSON
- Copy to clipboard - One-click copying of formatted output
- Responsive design - Works on desktop and mobile
- Real-time validation - Instant feedback on JSON validity
- Modern UX - Clean, intuitive interface
- Node.js 18+ and npm
- Clone the repository:
git clone https://github.com/sva-s1/jlint.git
cd jlint
- Install dependencies:
npm install
- Copy the example environment file:
cp .env.example .env
(The default values work out of the box, but you can customize them if needed)
- Start the development server:
npm run dev
- Open http://localhost:4321 in your browser
- Paste your JSON - Copy and paste your JSON data into the left input area
- Validate & Format - Click the "Validate & Format" button to check syntax and prettify
- Toggle compression - Use the "Compress" button to minify or "Prettify" to format with indentation
- Copy results - Click the "Copy" button to copy the formatted JSON to your clipboard
- Switch themes - Use the toggle in the top-right corner to switch between light and dark themes
- Clear workspace - Click "Clear" to reset both input and output areas
- Real-time validation: Get instant feedback if your JSON has syntax errors
- Syntax highlighting: Keys, strings, numbers, booleans, and null values are color-coded
- Line numbers: Visual line numbers with synchronized scrolling help locate errors quickly
- Error reporting: Clear error messages with line and column information, word-wrapped for full visibility
- Theme persistence: Your preferred theme is saved and restored on future visits
- Privacy-focused: All processing happens in your browser - no data is sent to any server
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
/
βββ .env # Environment configuration
βββ .env.example # Environment template
βββ README.md # Project documentation
βββ astro.config.mjs # Astro configuration
βββ package-lock.json # Dependency lock file
βββ package.json # Project dependencies and scripts
βββ tailwind.config.mjs # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ public/
β βββ favicon.svg # Site favicon
βββ src/
βββ pages/
β βββ index.astro # Main application page
βββ styles/
βββ global.css # Catppuccin theme styles
JLint uses the beautiful Catppuccin color palette with two variants:
- Mocha - Dark theme with warm, cozy colors
- Latte - Light theme with soft, creamy tones
The theme toggle is located in the top-right corner and remembers your preference.
Environment variables can be configured in .env
:
JLINT_SITE_NAME
- Application name (displayed in footer)JLINT_SITE_AUTHOR
- Author nameJLINT_SITE_AUTHOR_URL
- Author website/profile URLREFERRER
- Organization/entity name (e.g., "A DataDocs Tool")REFERRER_URL
- Organization website URL
JSONLINT_URL
- Original jsonlint.com URL for attributionCATPPUCCIN_URL
- Catppuccin theme URL for creditsNETLIFY_URL
- Netlify hosting URL for credits
JLINT_SITE_URL
- Production URL (not implemented yet)JLINT_SITE_DESCRIPTION
- Site description (not implemented yet)JLINT_SITE_VERSION
- Application version (not implemented yet)
Build the project for production:
npm run build
The built site will be in the ./dist/
directory, ready to deploy to any static hosting service like Netlify, Vercel, or GitHub Pages.
- jsonlint.com - The original JSON validation tool
- Catppuccin - Beautiful color palette
- Font Awesome - Icons
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
- Line numbers - Visual line numbers in input area with synchronized scrolling
- GitHub icon in top-right corner linking to project repository
- "Edit this page" or "Contribute to this project" widget/button
- Dynamic icon/favicon that changes based on validation state or theme
- GitHub Actions workflow for automated Lighthouse performance testing
- JSON schema validation
- Import/export functionality for JSON files
- Keyboard shortcuts (Ctrl+Enter to validate, Ctrl+C to copy)
- Multiple format support (YAML, XML conversion)
- JSON path explorer
- JSON diff/comparison tool
- Batch validation for multiple JSON objects
- Custom validation rules
- JSON minification statistics
- History of validated JSONs (local storage)
- API for programmatic validation
- Browser extension
- CLI version
- Integration with popular IDEs
- Export formatted JSON as image
- Collaborative editing features
- Plugin system for custom validators
- Advanced syntax highlighting themes
- Performance optimizations for large JSON files
- Accessibility improvements
Privacy: All JSON processing happens client-side. No data is sent to any server.