Skip to content
Toolzy 100% free · no login

Home › Developer Tools › Online SQL Compiler

Online SQL Compiler (SQLite)

Runs in your browserFree · no sign-up

Write CREATE, INSERT and SELECT statements and press Run. A fresh SQLite database is created for every run on your device, and query results are shown as tables.

Ctrl + Enter runs the code. Tab indents; press Esc then Tab to move focus out of the editor.

Other languages: Python · JavaScript · Lua · HTML, CSS & JS playground

Advertisement

How to use this tool

  1. Write your SQL in the editor, or pick an example such as JOIN or GROUP BY.
  2. Separate statements with semicolons. Create and fill your tables in the same script.
  3. Press Run or Ctrl + Enter. Each SELECT result appears as its own table.
  4. Share the script with a link, or download it as a .sql file.

Practise SQL with a real database engine

This page runs SQLite, the most widely deployed database engine in the world, compiled to WebAssembly with the sql.js project and served from this site. When you press Run, a brand-new in-memory database is created on your device, your whole script is executed from top to bottom, and the result of every statement that returns rows is shown as a table. Because the database starts empty each time, a typical script creates its tables, inserts sample rows and then queries them, exactly like the examples in the menu.

What you can write

SQLite supports the core of standard SQL: CREATE TABLE with primary and foreign keys, INSERT, UPDATE, DELETE, SELECT with WHERE, ORDER BY, LIMIT, GROUP BY and HAVING, inner and left joins, subqueries, UNION, common table expressions with WITH (including recursive ones), views, indexes, triggers, and window functions such as ROW_NUMBER(), RANK() and running SUM() OVER. Built-in functions include string, date and maths helpers. Error messages come straight from SQLite, so a syntax mistake points at the word it did not expect.

Differences from MySQL, PostgreSQL and SQL Server

SQL dialects differ in the details. SQLite uses flexible typing, so a column declared INTEGER can still hold text; it has no RIGHT JOIN in older versions, uses || for string concatenation, and has its own date functions such as date() and strftime(). Queries written for interviews and courses usually run unchanged, but vendor-specific features like stored procedures will not. For learning SELECT logic, joins and aggregation, the differences rarely matter.

Private by design

No query and no data leaves your browser, which makes it safe to paste a schema from work to test a query. Results are limited to the first 500 rows per table for display. The time limit and Stop button end a runaway recursive query without freezing the page.

Frequently asked questions

Which SQL dialect does this use?

SQLite 3, compiled to WebAssembly. Most standard SQL, joins, CTEs and window functions work.

Do my tables stay between runs?

No. Each run starts with an empty in-memory database, so include CREATE TABLE and INSERT statements in your script.

Can I connect to my own MySQL or PostgreSQL server?

No. This is a self-contained SQLite engine in your browser and never connects to servers.

How many rows are shown?

Up to 500 rows per result table are displayed; the row count is always reported.

Is my data uploaded?

No. The database lives in your browser memory and is discarded after each run.

More free tools