DevToolsmith

SQLite Database Lab

Run real SQL on local CSV, JSON and SQLite files. Import tables, join datasets, inspect results and download your database — everything runs in your browser.

Runs 100% in your browser — nothing is uploaded

Drop a .sqlite, .sqlite3 or .db file here to open it, or use Open SQLite file below. Maximum 20 MB. Opening a file replaces this tab’s database; download your current database first to keep it.

Your database stays in memory in this tab. Download it to keep your tables and changes. Each operation runs on a copy; errors and Stop keep the previous database intact.

A workflow starts from the input and SQL shown below. For multi-table sessions or previous SQL changes, download the database to keep the complete state.

Import the sample or your own data, then run a query.

1. Import a table

Table data
Tip: drop a file here74 chars · 74 bytes · 5 lines

Import another name to add a table for joins. Existing table names are never overwritten. JSON strings stay text; nested values are JSON text. Blank CSV cells stay empty text.

2. Query your database

SQL
Tip: drop a file here99 chars · 99 bytes · 4 lines
Ctrl / ⌘ Enter

SELECT, joins, aggregations, CTEs and schema/data changes run in SQLite. The last row-producing statement supplies the result. Only this local copy changes.

Tables (0)

Import data, open a SQLite file or create your first table.

Query results

Run SQL to view a result. SELECT queries with no matches still show their column names.

Query an export without setting up a server

Import your CSV or JSON under the default table name records. The sample groups sales by category and calculates their totals. Change the query to select only the columns or rows you need.

Summarize imported records
SELECT category, ROUND(SUM(amount), 2) AS total
FROM records
GROUP BY category
ORDER BY total DESC;

Join two local datasets

Import the first file as orders and the second as customers, then join them by their common identifier. Choose a new name for each import: importing never overwrites an existing table.

Join orders to customers
SELECT c.name, SUM(o.total) AS revenue
FROM orders AS o
JOIN customers AS c ON c.id = o.customer_id
GROUP BY c.id, c.name
ORDER BY revenue DESC;

Repeat a query as a workflow

The CSV → SQLite query → TypeScript workflow carries data through connected steps. Change the query, inspect its JSON result, then generate types, Zod schemas or CSV. Save the workflow locally to run the same task on a new export.

Storage, precision and supported SQL

The database lives in memory in this tab. Download it before closing or refreshing the page to retain imported tables and SQL changes. Opening a database file replaces the working copy after the file has been validated. A failed or cancelled operation keeps your last successful copy.

Imported columns use SQLite’s dynamic storage without column affinity, so a JSON string such as "00123" remains text. CSV inference is optional. Signed 64-bit integers stay exact; wider integers or numbers that cannot be represented safely are stored as text. Arithmetic, casts and user-written SQL follow SQLite rules and can change precision. Blob results are exported as hexadecimal strings, and non-finite floating-point values are exported as strings because JSON cannot represent them.

SELECT, CTEs, joins, aggregations, VALUES, EXPLAIN and CREATE/ALTER/DROP/INSERT/UPDATE/DELETE statements are supported. Transaction-control statements, ATTACH, PRAGMA and server-specific SQL are excluded. A script’s results come from its last row-producing statement. CSV downloads protect text beginning with spreadsheet formula characters. Duplicate result column names receive suffixes in exported files so no value is dropped.

For larger datasets, reduce the file first or use a native database. This lab limits imports to 5 million text characters and 250,000 cells, database files to 20 MB, and displayed/exported results to 5,000 rows. Save basic tools offline while connected to include the SQLite processor and WebAssembly binary.

For analytics over Parquet or multiple imported file formats, try DuckDB Playground. Its queries start with a fresh database each time; this SQLite lab is the choice when you need to inspect, change or download a SQLite database.

Frequently asked questions

Can I query a CSV or JSON file with SQL?

Yes. Paste or upload the data, choose a table name, and import it. Then use SELECT, WHERE, GROUP BY and JOIN against that table. Import a second dataset with a different table name to join them.

Is this a real SQLite database?

Yes. SQLite runs through sql.js WebAssembly in a worker in your browser. You can open a SQLite 3 database file and download the resulting database. It does not connect to a database server.

Are database files or queries uploaded?

No. Database files, imported data, SQL and results are processed on your device. Nothing is saved automatically. Download a database to keep its tables, or use a saved workflow to keep a repeatable query recipe.

What happens to large numbers and JSON strings?

Signed 64-bit integers are read and exported exactly. Numeric-looking JSON strings remain text. Imported numbers beyond SQLite precision are preserved as text; decimal calculations use SQLite floating-point semantics. JSON booleans become 1 and 0, and nested JSON values become text.

What are the size and query limits?

Import at most 5 million text characters, 50,000 rows, 200 columns and 250,000 cells per table. SQLite files and generated databases are limited to 20 MB and 50 tables. Each operation stops after 15 seconds. Results show and export at most 5,000 rows and 2 million characters; pagination displays 50 rows per page.