SQLite Online (SQL Playground)
A full SQLite database in your browser — open, query, import, export.
Database
No database is open yet: open a file, or start with the sample or an empty database.
Ctrl+Enter (⌘+Enter) runs everything, or only the selected text · Ctrl+Shift+Enter runs the statement under the cursor · Esc, then Tab, leaves the editor.
Results
Run a query to see its results here.
About the SQLite Online (SQL Playground)
A complete SQLite database engine running in your browser. Open a .sqlite or .db file — from an app, a phone backup or a project — or start from the sample bookshop or an empty database. Browse the tables, their columns and row counts, write SQL with completion for your table and column names, and see each statement’s result in a grid. Turn CSV or JSON files into tables in one step, export any result as CSV or JSON, check how a query runs with Explain, and download the changed database.
The engine is real SQLite (version 3.49, compiled to WebAssembly by the sql.js project), so the SQL and the file format are exactly SQLite’s; only the extra math functions differ a little (see below). It runs in a background worker on your device: nothing is uploaded, the page stays responsive during long queries, and Stop ends a runaway query.
How to use it
- Drop a database file onto the box (or choose one), or press Sample database or New empty database. To make a table from a spreadsheet export, drop a
.csvor.jsonfile instead. - Write SQL in the editor. Table and column names appear as completions, and the list under Database shows every table, view, index and trigger with its columns. Selecting a table’s Query writes and runs
SELECT * FROM …for you. - Press Run or Ctrl+Enter (⌘+Enter) to run everything — or only the selected text when something is selected. Ctrl+Shift+Enter runs just the statement under the cursor, and Explain shows its query plan.
- Read the results: each statement gets its own grid with the number of rows and the time it took. CSV and JSON download a result; Download database saves the whole database as a
.sqlitefile.
Examples
SELECT c.name, COUNT(DISTINCT o.id) AS orders, SUM(oi.quantity) AS books FROM customers c JOIN orders o ON o.customer_id = c.id JOIN order_items oi ON oi.order_id = o.id GROUP BY c.id ORDER BY books DESC LIMIT 3;
name orders books Asha Rao 3 7 Dina Kapoor 1 3 Chen Wei 1 2
Drop sales.csv (columns: date, region, amount) → table "sales" SELECT region, ROUND(SUM(amount), 2) AS total FROM sales WHERE date >= '2026-07-01' GROUP BY region ORDER BY total DESC;
One row per region with its total — download it as CSV with one click.
Column types are detected: whole numbers become INTEGER, decimals REAL, everything else TEXT. Codes with leading zeros, such as PIN codes or 007, stay text.
Common uses
- Opening a SQLite file from an app or a backup to see what is inside, without installing DB Browser for SQLite or the sqlite3 command line.
- Learning and practising SQL — joins, GROUP BY, window functions, CTEs — on the sample database.
- Answering a question about a CSV or JSON export with a few lines of SQL instead of spreadsheet formulas.
- Checking whether a query uses an index with EXPLAIN QUERY PLAN, before shipping it.
What the SQLite engine supports
- SQLite 3.49: window functions, common table expressions (
WITH, includingWITH RECURSIVE),UPSERT(ON CONFLICT … DO UPDATE),RETURNING, generated columns,STRICTtables, foreign keys (switch them on withPRAGMA foreign_keys = ON, as in any SQLite). - JSON functions (
json_extract,->>,json_each,json_group_array…), date and time functions, math functions (sqrt,power,exp,log10,ceil,floor,pi, trigonometry …) and statistics (median,stdev,variance,lower_quartile). - The math functions come from sql.js’s extension library, not from SQLite’s own: here
log(x)is the natural logarithm (in SQLite’s documentation it is base 10, so writelog10(x)for that), andln,log2,mod,truncandpoware missing — uselog(x),log(x) / log(2),a % b,CAST(x AS INTEGER)andpower(x, y). - Full-text search with FTS3 and FTS4 (FTS5 is not included in this build).
REGEXP(WHERE name REGEXP '^A'), using JavaScript regular-expression syntax — SQLite itself defines the operator but no implementation.- Loading extensions (
load_extension) is not possible.
How Stop works
SQLite cannot be interrupted from outside while it computes, so Stop ends the engine and starts a new one. The database is then rebuilt automatically: the file you opened (or the empty or sample database) is loaded again and every statement and import that changed it since is replayed in order. Queries that only read data are not replayed. Values that depend on the moment — random(), datetime('now') — get new values in the replay, and a very long change takes as long again to replay.
Moving from MySQL or PostgreSQL
- Types are flexible: a column’s declared type is a preference (its affinity), so
INTEGER,TEXT,REAL,BLOBandNUMERICcover everything; useSTRICTtables to enforce types. AUTO_INCREMENTis writtenINTEGER PRIMARY KEY(optionallyAUTOINCREMENT).- Concatenate with
||; there is noCONCAT_WSbefore 3.44 (this version has both). - Dates are stored as text (
'2026-10-04') or numbers and handled withdate(),strftime()andjulianday(). ALTER TABLEcan rename tables and columns and add or drop columns, but not change a column’s type.
Limitations
- The database lives in this page’s memory. Changes are lost when you close or reload the page, unless you press Download database (the page warns you before leaving with unsaved changes).
- Files up to 300 MB can be opened; imports up to 100 MB. Each result keeps up to 100,000 rows (and a run up to 2 million cells) for the grid and the exports; add
LIMITandOFFSETfor more. - One database file at a time:
ATTACHcan only create new, empty databases inside the page (it cannot reach files on your disk), and attached databases are not part of the download. - Encrypted databases (SQLCipher) cannot be opened.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot. The SQLite engine (about 650 KB of WebAssembly) is downloaded from this site the first time you open, import or run something; after that it also works offline. Your databases, files and queries are never uploaded.
Frequently asked questions
Is my database uploaded anywhere?
No. The file is read by SQLite running in your browser; it never leaves your device. Only the engine itself is downloaded from this site, once.
Are my changes saved?
Only while the page is open. Press Download database to save the changed database as a .sqlite file; it is a compact copy (like VACUUM), with all tables, indexes, views and triggers. Your SQL in the editor (up to 200,000 characters) is kept in this browser for next time.
Which files can I open?
Any SQLite 3 database, whatever its extension: .sqlite, .sqlite3, .db, .db3, .s3db. Many apps store their data this way — browser history files, Android apps, Lightroom catalogues. A file that is not a SQLite database is refused with a message. CSV, TSV and JSON files are imported as new tables instead.
How do I turn a CSV file into a table?
Drop it onto the box. The first row becomes the column names (simplified to snake_case unless you untick that), types are detected, empty cells become NULL, and the table is named after the file. Excel CSV files in Windows-1252 or UTF-16 are read correctly.
Why did Stop take a few seconds?
Stopping restarts SQLite and rebuilds your database by replaying the changes you made since opening it (see “How Stop works”). With many large changes that takes a moment; queries that only read data are skipped.
Can I use this to learn SQL?
Yes — press Sample database for a small bookshop (authors, books, customers, orders) and try joins, aggregates and window functions on it. Mistakes are harmless: Sample database gives you a fresh copy at any time.