SQL Playground
A place to learn and test SQL safely. Write a query against sample data, read the answer, then try your own — the database is in memory on your device, so nothing is uploaded and nothing can be lost.
SQL Editor
SQLite (WASM) runs locally with full SQL support: multiple tables, JOIN/LEFT JOIN, GROUP BY, UNION/UNION ALL, subqueries, CTEs, CREATE/INSERT/UPDATE/DELETE, transactions, views, indexes, DISTINCT, ORDER BY/LIMIT and SQL NULL. Every result set is shown, not just the last.
Sample schema — users and orders
users(id, name, age, city) → orders(id, user_id, total, status), joined on users.id = orders.user_id.
Tables load with the engine.
Results
Learn SQL here
The playground is a sandbox: it forgets everything on reload, so a wrong answer costs nothing. The guides cover reading a query clause by clause, how indexes decide speed, the PostgreSQL and MariaDB differences that actually bite, and a checklist before you ship a query.
Why your queries never leave this page
Everything below runs inside your browser. The SQL engine is a small JavaScript program that lives on this page, and the database it builds exists in your browser's memory. There is no database server to connect to and no account to create.
Nothing you type is uploaded. There is no upload step because there is no server to upload to. The code that does the work is already on your computer, downloaded once like a picture. A query, a table name, a value you insert — none of it crosses the network.
What that means in practice
Press F12, open the Network tab and run a query. No new request appears. Or turn off your Wi-Fi and keep using the playground: it still works, because it never needed the connection in the first place.
Reloading the page clears every table you created. That is the point — a playground is a place to try things, not a place where a mistake persists.
Verify it in fifteen seconds
- Open Developer Tools (F12) and click the Network tab.
- Run any query above.
- Watch the Network tab: no new requests appear. The only entries are this page's own files.
- Or turn off your Wi-Fi and keep querying. It still works.
About the site
The site is supported by advertising and an optional donation. The tools do not depend on the ad network being reachable, so if you block ads nothing breaks. Buy me a coffee if it helped — the link is in the footer.