SQL Playground

Run real SQL against an in-browser SQLite database — no install, no server.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A full SQLite database that runs entirely inside your browser. There is no install, no account and no server round-trip — a WebAssembly build of SQLite is loaded once, the sample tables are created in memory, and every query you run executes locally in milliseconds. It is a genuine SQL sandbox for practising queries, prototyping reports, debugging a statement before it hits production, or teaching how JOINs and aggregates actually behave on real rows.

How it works

When the page loads, the playground fetches the SQLite WebAssembly engine (the library’s own asset) and spins up a fresh in-memory database. It then runs a seed script that creates the tables for your chosen sample dataset and inserts a few dozen realistic rows. From that point on everything is local: the editor sends your SQL straight to the embedded engine, and the rows that come back are rendered as a scrollable result table.

Because it is the real SQLite engine — not a re-implementation — the full dialect is available. You can write multi-table JOINs, GROUP BY aggregates with HAVING, correlated subqueries, common table expressions (WITH … AS), CASE expressions and window functions. You can also reshape the database itself with CREATE TABLE, INSERT, UPDATE and DELETE; those statements report how many rows they changed rather than returning a table. A Reset data button rebuilds the seed tables whenever you want a clean slate, and your query text is remembered between visits via localStorage, so the workspace feels like an app you return to rather than a one-shot form.

Every result set can be exported to CSV with one click, which makes the playground a quick way to turn a question into a downloadable answer — slice the sample data, or paste in your own CREATE/INSERT statements and query your own tables. Press Ctrl/Cmd + Enter to run, exactly like a desktop SQL client.

Example

Open the HR / Employees dataset. It ships with a departments table and an employees table linked by department_id. Suppose you want the average salary and headcount per department, highest first. Run:

SELECT d.name AS department,
       COUNT(e.id) AS headcount,
       ROUND(AVG(e.salary)) AS avg_salary,
       MAX(e.salary) AS top_salary
FROM employees e
JOIN departments d ON d.id = e.department_id
GROUP BY d.name
ORDER BY avg_salary DESC;

You get a tidy four-column table — Engineering on top with the highest average — in well under a millisecond, with an Export CSV button beside it.

departmentheadcountavg_salarytop_salary
Engineering48750099000
Marketing27100073000
Sales26750071000
Support25950061000

Switch to the E-commerce / Orders dataset to practise joining three tables (customers, products, orders) into a revenue-by-customer report, or pick Blank and build your own schema from scratch. Every figure is computed in your browser — no query, table or row is ever uploaded.

Ad placeholder (rectangle)