How do I run SQL queries online without installing anything?
Type or paste your SQL into the editor and click Run to execute it instantly against a full SQLite database running in your browser via WebAssembly. You can CREATE tables, INSERT data, run JOINs, window functions, CTEs, and aggregations — or load one of the sample datasets to start practicing immediately. Everything runs client-side — your queries and data never leave your device.
Loading SQLite engine…
SQLite Quick Reference
Data Definition
CREATE TABLE t ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, val REAL DEFAULT 0 ); ALTER TABLE t ADD col TEXT; DROP TABLE IF EXISTS t;
Queries
SELECT * FROM t WHERE x > 5; SELECT a, COUNT(*) FROM t GROUP BY a HAVING COUNT(*) > 1; SELECT * FROM t1 JOIN t2 ON t1.id = t2.fk;
Data Manipulation
INSERT INTO t (a, b) VALUES (1, 'x'), (2, 'y'); UPDATE t SET a = 10 WHERE id = 1; DELETE FROM t WHERE a IS NULL;
Functions
COUNT, SUM, AVG, MIN, MAX LENGTH, UPPER, LOWER, TRIM SUBSTR, REPLACE, INSTR COALESCE, NULLIF, IIF date, time, datetime, strftime
Window Functions
ROW_NUMBER() OVER ( PARTITION BY col ORDER BY col2 ) RANK, DENSE_RANK, NTILE LAG, LEAD, FIRST_VALUE
CTEs & Subqueries
WITH cte AS ( SELECT a, COUNT(*) AS cnt FROM t GROUP BY a ) SELECT * FROM cte WHERE cnt > 1;
How It Works
In-Browser SQLite
This playground runs a complete SQLite database engine in your browser using WebAssembly. No server required — your queries and data never leave your device.
Full SQL Support
Supports CREATE, INSERT, UPDATE, DELETE, SELECT with JOINs, subqueries, CTEs, window functions, aggregations, indexes, views, triggers, and more.
Multiple Statements
Run multiple SQL statements in sequence separated by semicolons. Each statement's results display separately with execution timing.
Schema Inspector
Click "Schema" to view all tables in your database with their CREATE TABLE definitions. Useful for checking column names and types.
Powered by sql.js (SQLite compiled to WebAssembly). Your SQL and data are processed entirely in your browser — nothing is sent to any server. Database resets when you refresh the page.
Tips & Best Practices
Practice JOINs with the built-in sample datasets
Understanding JOINs is the most important SQL skill. Use the sample datasets with related tables (users + orders, posts + comments) to practice INNER JOIN, LEFT JOIN, and self-joins. Master these three and you can handle 95% of real-world query requirements.
SQLite has quirks that differ from PostgreSQL and MySQL
This playground runs SQLite (via WebAssembly). SQLite uses dynamic typing (any column accepts any type), doesn't enforce VARCHAR length, and has limited ALTER TABLE support. Queries that work here may need adjustment for PostgreSQL (stricter types) or MySQL (different date functions).
Use CTEs and window functions for interview-style SQL problems
WITH ranked AS (SELECT *, ROW_NUMBER() OVER (PARTITION BY department ORDER BY salary DESC) AS rn FROM employees) SELECT * FROM ranked WHERE rn <= 3; This common interview pattern uses both CTEs and window functions — practice it here until it's second nature.
Client-side SQL is safe — your data never leaves the browser
This playground runs SQLite entirely in WebAssembly inside your browser. Your tables and data exist only in browser memory and are discarded when you close the tab. No database server is involved, so there's no risk of accidental data exposure or SQL injection to a production system.
Frequently Asked Questions
How does this SQL playground work without a server?
What SQL features does SQLite support?
Can I use this to practice for SQL interviews?
Is my SQL data safe in this tool?
Related Inspect Tools
LLM Token Counter
Count tokens and estimate API costs for GPT-4o, Claude, Gemini, and other LLMs with BPE tokenization
AI Model Comparison
Compare 23 AI models (Claude 4.6, GPT-4.1, Gemini 3) + 5 coding IDEs (Cursor, Copilot, Windsurf, Kiro, Antigravity) — pricing, context windows, capabilities
JSON Visualizer
Visualize JSON as an interactive tree — collapsible nodes, search, path copy, depth controls, and data statistics
Git Diff Viewer
Paste unified diff output from git diff and view it with syntax highlighting, line numbers, and side-by-side or inline display