SQL Playground

Runs in your browserDeveloper Tools#SQL#Database

Run SQL in an in-browser SQLite database with sample tables. Open and download .sqlite files.

Ctrl+Enter runs it. Select part of it to run only that.
How to use, limits & privacy

About SQL Playground

Practise and test SQL in a real SQLite database that runs inside your browser. Start with a sample database (students and marks, employees, or online orders), run any number of statements, and see every result as a table. You can open your own .sqlite or .sql file and download the database when you are done. Good for students learning SQL and for trying out queries without installing anything.

How to Use

1

Wait for SQLite to load

The first time, the page downloads the SQLite engine (about 650 KB). The Run button turns on when it is ready.

2

Pick a database

Choose a sample under Database, or click Open .sqlite / .sql to load your own file. The Tables panel lists every table with its columns and row count.

3

Write and run SQL

Type your statements and click Run or press Ctrl+Enter. Select part of the text to run only that part. Each SELECT shows its own table.

4

Save or start again

Click Download .sqlite to keep the database, or Reset to go back to the chosen sample without losing your query.

Privacy & Processing

  • Mode: local
  • Files Leave Browser: Local tool processing; review details below
  • Max Input Size: Device memory limits
  • Account Required: No
  • Data Stored Locally: Nothing is saved; the database is in memory until you leave the page. Use Download .sqlite to keep it.
  • Network Processing: Assets or models may require an initial download

Queries and database files stay in your browser. Only the SQLite engine is downloaded, from this site.

Rules & Limitations

  • The SQL is SQLite's, which differs from MySQL or SQL Server in places (for example LIMIT instead of TOP, and no stored procedures).
  • The database lives in memory: reloading or leaving the page loses changes, so download it first.
  • Tables show the first 1,000 rows of each result; a query stops after 100,000 rows.
  • Files up to 50 MB can be opened. A query that never ends freezes the page; reload it if that happens.

Top Suggestions

  • Practising SELECT, JOIN and GROUP BY for exams and job interviews
  • Checking a query before running it on a real database
  • Opening a .sqlite or .db file from an app to look inside
  • Teaching SQL in class without installing a database server

SQL Playground FAQ

Can I run SQL online without installing anything?

Yes. This page runs SQLite, a full SQL database, inside your browser. Pick a sample database, type a query and press Run.

Which SQL commands can I use?

Everything SQLite supports: CREATE TABLE, INSERT, UPDATE, DELETE, SELECT with JOIN, GROUP BY and window functions, views, triggers and WITH queries. MySQL-only or SQL Server-only syntax may not work.

What does NULL mean in the results?

NULL means there is no value, which is different from 0 or empty text. Use IS NULL or IS NOT NULL to test for it; = NULL never matches.

How do I open my own database file?

Click Open .sqlite / .sql and choose an SQLite file (.sqlite, .sqlite3 or .db) or a .sql script. A script is run into a new empty database.

Is my data uploaded to a server?

No. The database and your queries stay in your browser. The page only downloads the SQLite engine from this site; nothing you type or open is sent anywhere.