Ask questions of a SQLite database in plain English.

The query is written for you, run on a real SQLite engine in your browser and shown next to the result, a chart and the query plan. Use the sample store database or import your own CSV.

Version 2.0.0 · MIT license · github.com/dguywhoknows/nl-to-sql

The app itself, running inside this page. Anything you do here is saved in your browser.

Ask it to do things

Press Ctrl+K in the app (Cmd+K on a Mac) and describe what you want. The model chooses from the app's own functions, runs them in order and tells you what changed. Some examples:

Which five customers spent the most last quarter?Writes the SQL, runs it on the loaded database and shows the table.
Same thing but only for orders shipped lateEdits the previous query with an extra condition and reruns it.
Explain what this query is doingWalks through the current SQL clause by clause.

Instructions you save in the same box, such as "keep it short" or "I'm a beginner", are added to every AI request the app makes.

Features

Real SQLite
Via sql.js/WebAssembly, with no server.
Seeded
Reproducible sample DB with 1,500 orders across 2 years.
English → SQL
With schema-aware prompting and an automatic error-repair loop (up to 3 tries).
Guardrail that refuses to run
Non-read-only AI queries.
Auto chart
Line chart for time series, grouped bars for categories.
CSV import
With RFC-4180 parsing and column type inference.
AI query explainer
And AI result insights.
Editable SQL editor
Ctrl+Enter) with query history.
Query-plan tab
EXPLAIN QUERY PLAN rendered as a tree with full-scan warnings and AI index suggestions.
Schema explorer
Auto-laid-out ER diagram drawn from real foreign keys.

Runs in your browser

The database engine, sample-data generation, CSV parsing/type inference, charting. None of this needs a network connection or a model.

Uses a language model for

JSON-mode NL→SQL generation grounded on the live schema + sample rows. Self-repair: SQLite error messages are fed back to the model. Query explanations and data insights over the actual result set. Index recommendations grounded in the actual query plan.

Notes

Cost
Free. Each account has a daily allowance of AI requests.
Your data
What you make stays in this browser on this device. Your account is only used for signing in and for the built-in AI. You can export a backup or clear everything from Settings.
AI access
Signed-in users get the built-in AI with nothing to set up. You can also use your own Groq or OpenRouter key under Settings.
Source
The code and tests are on GitHub under the MIT license. The tests also run in your browser.