b2KIT

SQL Playground (SQLite WASM)

Run SQL queries against an in-browser SQLite database with table creation, import, and result display.

Tested tool guide Tested browser tools Checked August 16, 2026

What SQL Playground (SQLite WASM) does, with a checked example

This tool is a working SQLite database inside the page. The engine is compiled to WebAssembly and runs entirely in your browser; you issue SQL statements against a database you build yourself - create tables, insert rows, import data - and each query's result renders as a table you can inspect. The usual surprise is the dialect. This is SQLite, not MySQL or PostgreSQL: syntax and behavior you verify here apply to SQLite and nothing else. Queries written for another engine can fail here, and results proven here do not guarantee the same outcome on your production database.

Worked example

A concrete input and expected output from the current implementation.

Input

CREATE TABLE books (title TEXT, pages INTEGER);
INSERT INTO books VALUES ('Pride and Prejudice', 432), ('Moby-Dick', 585), ('The Great Gatsby', 180);
SELECT title FROM books WHERE pages > 300 ORDER BY pages DESC;

Expected output

title
Moby-Dick
Pride and Prejudice

2 rows returned

The WHERE clause keeps only the two books over 300 pages, and ORDER BY pages DESC sorts by page count, so Moby-Dick (585) precedes Pride and Prejudice (432). The Great Gatsby (180) fails the filter and is excluded.

How the result is produced

1

One live database, statement by statement

The page loads the SQLite engine compiled to WebAssembly and runs it locally, so your statements never leave the browser. All statements execute against one shared database: CREATE TABLE adds a schema object, INSERT adds rows, and a later SELECT sees the accumulated state, just like an interactive sqlite3 session. Referencing a table that was never created fails with SQLite's own error message, which names the missing object.

2

Results and imported data

Each executed statement returns either a row set or a change count. Row sets render as a table with the column names as the header; every selected row appears once, in the order the engine returned it. The import path turns external data into a table you can then query with ordinary SQL, and each new query re-reads the current state of the database.

Good uses

  • Sketch and validate a schema before writing real code: draft the CREATE TABLE statements here, confirm they run, and see how SQLite applies type affinity to each column.
  • Check the logic of a query against sample data before running it anywhere else: insert or import a few rows, execute the WHERE, GROUP BY, or ORDER BY you plan to ship, and inspect the actual rows returned.
  • Learn or evaluate SQLite-specific syntax - AUTOINCREMENT, LIMIT, UPSERT (ON CONFLICT), window functions - without installing the sqlite3 CLI or a database driver.

Limits and checks

  • The dialect is SQLite's and only SQLite's. Backtick identifiers, TOP, UPDATE ... FROM, and other engine idioms will error or behave differently; a query that runs here proves nothing about your MySQL, PostgreSQL, or SQL Server.
  • Without ORDER BY, row order is not guaranteed. The grid may appear to show insertion order, but SQLite is free to return rows in any order, so do not read sequence into an un-ordered result or rely on it.
  • SQLite types columns loosely: a column declared INTEGER can still hold text, and imported data frequently contains values that cannot be parsed as numbers. Because SQLite orders text after numbers, WHERE pages > 300 can unexpectedly include rows whose value is a non-numeric string.

Common questions

Can I run queries written for MySQL or PostgreSQL here?

Only if they happen to be portable SQL. This playground runs SQLite, which has its own dialect: TOP, backticks, NOW(), and similar constructs do not work, while SQLite accepts things like LIMIT and ON CONFLICT that others do not. Treat results here as describing SQLite behavior only.

Does my data get uploaded somewhere?

No. The SQLite engine is compiled to WebAssembly and executes inside the page, so your statements, imports, and data are processed locally and nothing is transmitted. Note that running locally also means nothing is stored for you: keep your own copy of anything you want to keep.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools