SQL Playground

A real SQLite database in your browser; import CSV

Ctrl/Cmd + Enter

Loading SQLite…

How to run SQL in your browser

  1. Wait a moment while SQLite loads (about 1 MB, cached after the first visit). Two sample tables, customers and orders, are created so you can start querying straight away.
  2. Write any SQL and press Run or Ctrl/Cmd + Enter. You can run several statements at once; each SELECT shows its own result table.
  3. Press Import CSV to load a spreadsheet export as a new table. Column types are detected, so numeric columns sort and sum correctly.
  4. Open an existing .sqlite or .db file, and export your database or any result as CSV when you are done.

A real database, not a simulation

This playground runs the actual SQLite engine compiled to WebAssembly (sql.js). It supports the full SQLite dialect: joins, subqueries, common table expressions (WITH), window functions such as ROW_NUMBER() OVER (...), JSON functions, views, indexes, triggers and transactions. That makes it a great way to practise SQL for interviews, teach a class, or analyse a CSV file far faster than in a spreadsheet: group, filter and join large exports with a few lines of SQL.

The database lives in memory. Refreshing the page starts fresh, but your query text is saved, and Export DB saves everything as a file you can reopen here or in any SQLite tool such as DB Browser for SQLite or the sqlite3 command line.

Privacy

Your data never leaves your device. CSV and database files are read locally and queried in your browser's memory; only the SQLite engine itself is downloaded from a CDN.

Is this MySQL or PostgreSQL?

It is SQLite. Most standard SQL is the same, but some functions differ: use strftime() for dates, || to join strings and LIMIT/OFFSET for paging.

How big a CSV can I import?

Files with hundreds of thousands of rows work on most computers. The limit is your browser's memory.

Why does my imported table have the wrong types?

A column is typed NUMERIC only if every value is a number. Clean stray text such as "N/A" or use CAST(column AS REAL) in your queries.

Made by BufferMint. We also design and build software products for founders. See our services →

Your files and inputs never leave your device; we only count anonymous visits.