SQL Playground — Run SQL Online

A full SQLite database running in your browser. Practise joins and window functions on sample data, import your own CSV, run several statements at once and export the results.

Runs in your browserUpdated
Tables
Loading SQLite…

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the SQL Playground

  1. Wait a moment for SQLite to load — sample tables customers, products, orders and order_items are created for you.
  2. Write SQL in the editor or click an example, then press Run or Ctrl+Enter.
  3. Import your own CSV as a table, or open an existing .sqlite file.
  4. 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

TableColumns
customersid, name, email, country, created_at
productsid, name, category, price
ordersid, customer_id, status, created_at
order_itemsorder_id, product_id, quantity, unit_price

SQLite vs MySQL and PostgreSQL

  • Types are flexible: a column declared INTEGER can hold text. Use STRICT tables to enforce types.
  • Dates are stored as text or numbers; use date(), datetime() and strftime().
  • RIGHT and FULL OUTER JOIN are supported in recent versions; ILIKE is not — LIKE is 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?
SQLite 3. Most standard SQL works unchanged; vendor-specific features of MySQL, PostgreSQL or SQL Server (stored procedures, ILIKE, SERIAL) do not.
Is my data private?
Yes. The database lives in your browser’s memory. Imported CSV and .sqlite files are never uploaded.
How big can my data be?
It is limited by your device’s memory. Tens of megabytes and hundreds of thousands of rows work fine on a typical laptop.
Can I keep my database?
Click Download database to save a .sqlite file, and Open .sqlite file to continue later. It also opens in DB Browser for SQLite, DBeaver and the sqlite3 CLI.

Related tools