GitHub - Moussa-M/sqljs: SQL.js playground with interactive query execution and data visualization

An interactive SQL.js playground with query execution and data visualization capabilities. Run SQL queries directly in your browser with real-time results and an intuitive interface.

Deployed on Vercel

🌐 Live Demo: sqljs.vercel.app

✨ Features

  • 🚀 Browser-Based SQL Engine - No server required, runs entirely in the browser using SQL.js
  • 📝 Interactive Query Editor - Write and execute SQL queries with syntax highlighting
  • 📊 Data Visualization - View query results in formatted tables
  • 💾 Sample Database - Pre-loaded with sample data to get started quickly
  • Instant Results - Execute queries and see results immediately
  • 📱 Responsive Design - Works seamlessly on desktop and mobile devices

🎯 Use Cases

  • Learning SQL - Perfect for students learning SQL syntax and queries
  • Query Testing - Test SQL queries before implementing in production
  • Data Analysis - Analyze datasets directly in the browser
  • Teaching - Demonstrate SQL concepts without database setup
  • Prototyping - Quickly prototype data models and queries

🚀 Getting Started

Simply visit sqljs.vercel.app and start writing SQL queries!

Example Queries

-- Create a table
CREATE TABLE users (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  email TEXT UNIQUE
);

-- Insert data
INSERT INTO users (id, name, email) VALUES
  (1, 'John Doe', 'john@example.com'),
  (2, 'Jane Smith', 'jane@example.com');

-- Query data
SELECT * FROM users;

🛠️ Technology Stack

  • SQL.js - SQLite compiled to JavaScript via Emscripten
  • HTML5 - Modern web standards
  • JavaScript - Interactive functionality
  • Vercel - Deployment and hosting

📝 How It Works

SQL.js is a JavaScript library that runs SQLite entirely in the browser. This playground provides an intuitive interface to:

  1. Write SQL queries in the editor
  2. Execute queries against an in-memory SQLite database
  3. Display results in a formatted table
  4. Manage database state during your session

All data processing happens client-side, ensuring privacy and eliminating the need for a backend server.

🔒 Privacy

All queries and data remain in your browser. Nothing is sent to any server, ensuring complete privacy and security for your data experiments.

📄 License

MIT License

🤝 Contributing

Issues and pull requests are welcome! Feel free to contribute improvements or report bugs.


Built with ❤️ by Moussa Mokhtari