Run SQL on SQLite

Query a SQLite database with SQL and get the result as a table.

When to use it

Use it to answer a question from a SQLite database, such as totals per month, without installing a database program.

How it works

  1. Choose a file, or drop it onto the box above.
  2. Write one SELECT statement. It runs on a read-only copy of the database in your browser; the result can be previewed, downloaded as CSV or turned into Excel in the next step.
  3. Press the Run query button.
  4. Download the result, or add a next step without downloading.

Supported formats

Input
SQLite (.db, .sqlite, .sqlite3, .db3)
Output
CSV
Files
One file at a time

Where your file goes

This tool runs in your browser: the file is processed on your device and is not uploaded. The Network tab of your browser's developer tools shows this.

On first use, your browser downloads the code this tool needs from this site. Your file is not sent anywhere.

What is kept, and what is not

The database is never changed: writes are refused. Results are limited to 100,000 rows, and you are told when the limit was reached.

Limits

  • One SELECT statement at a time. Statements that change the data are refused, and results stop at 100,000 rows.
  • Files up to 512 MB each.
  • The work happens in your device's memory, so a phone may fail on a file that a computer handles.

If something goes wrong

My query is refused

Only reading is allowed. INSERT, UPDATE, DELETE and other statements that change data are not run.

The page becomes slow with a very large file

Close other tabs, or use a computer instead of a phone.

My file is not accepted

Check the formats listed above. A damaged file, or one with the wrong extension, is refused with a message saying why.

Questions

How do I see which tables exist?

The query field starts with a query that lists every table and view. Run it first.

Can I get the result in Excel?

Yes. Download it as CSV, or add CSV to Excel as the next step.

Continue with the result

The result can go straight into another tool on this page, without downloading it and uploading it again:

Related tools