How to use the SQL Playground
- Wait a moment for SQLite to load — sample tables
customers,products,ordersandorder_itemsare created for you. - Write SQL in the editor or click an example, then press Run or Ctrl+Enter.
- Import your own CSV as a table, or open an existing
.sqlitefile. - Export the last result as CSV, or download the whole database.
A real database, not a simulator
The playground runs SQLite 3 compiled to WebAssembly (sql.js), so you get a genuine SQL engine: joins, subqueries, common table expressions, window functions, JSON functions, views, triggers, transactions and indexes. Everything happens in your browser’s memory; nothing is sent to a server, and closing the tab discards the data unless you download the database.
Sample schema
| Table | Columns |
|---|---|
customers | id, name, email, country, created_at |
products | id, name, category, price |
orders | id, customer_id, status, created_at |
order_items | order_id, product_id, quantity, unit_price |
SQLite vs MySQL and PostgreSQL
- Types are flexible: a column declared
INTEGERcan hold text. UseSTRICTtables to enforce types. - Dates are stored as text or numbers; use
date(),datetime()andstrftime(). RIGHTandFULL OUTER JOINare supported in recent versions;ILIKEis not —LIKEis case-insensitive for ASCII.
Check dialect-specific syntax with the SQL validator, tidy queries with the SQL formatter and turn spreadsheets into INSERT statements with CSV to SQL.
Tools that pair well with the SQL Playground
- CREATE TABLE Generator — Design a table column by column — types, primary key, NOT NULL, UNIQUE, auto-increment and defaults — and get the correct CREATE TABLE syntax for your database.
- SQL to JSON, CSV & Excel — Paste a SQL dump or a few INSERT statements and get the rows back as JSON, CSV or an Excel workbook with one sheet per table.
- Excel to JSON — Open an .xlsx workbook or paste cells straight from Excel or Google Sheets and get clean JSON.
- JSON to Excel — Turn a JSON array into a real Excel workbook.
Frequently asked questions
Which SQL dialect does the playground use?
ILIKE, SERIAL) do not.