Natural Language SQL
github.com
What it is
Natural Language SQL turns plain-English questions about databases into SQL, validates and runs the query, then streams back results. It connects to PostgreSQL and MySQL, including multiple databases of the same type in parallel. Hybrid retrieval combines BM25 and sentence-transformer vectors to select schema context for a question. Users can review and edit generated SQL before execution, while the interface shows progress through query stages. Results can be sorted, paginated at 50 rows per page, downloaded as CSV or JSON, or copied as tab-separated text. SELECT queries receive a default limit, explicit result counts are capped at 1,000 rows, and execution times out after 30 seconds by default. INSERT, UPDATE and DELETE are allowed by default, with warning banners; the project recommends a read-only database user to block writes. Ollama runs locally by default, keeping questions, schema and generated SQL on the user’s machine. OpenAI, Gemini and Groq are optional cloud providers and receive the question, relevant schema portion and SQL context. The project is free under GPL-3.0. Its recommended Docker setup needs Docker 20.10 or later with Compose v2 and about 10 GB of free disk space.
Spec sheet
- Purpose
- The engine turns plain-English database questions into SQL, validates and executes the query, and streams back results.Read 5 Oct 2026 · github.com
- Deployment
- The recommended Docker setup requires Docker 20.10 or later with Compose v2 and about 10 GB of free disk space.Read 5 Oct 2026 · github.com
- Privacy
- The project says it collects no telemetry; query results, schema metadata, and query history are held in memory for the session and are not written to disk by the application.Read 5 Oct 2026 · github.com
- License
- The repository states that the project is licensed under GPL-3.0.Read 5 Oct 2026 · github.com
- AI providers
- Ollama runs locally by default, with OpenAI, Gemini, and Groq available as opt-in cloud providers.Read 4 Oct 2026 · github.com
- Benchmark
- The README reports 52.32% execution accuracy on Spider dev.Read 5 Oct 2026 · github.com
- Cloud model options
- OpenAI, Google Gemini, and Groq are opt-in providers; using one sends the question, relevant schema portion, and SQL context to that provider.Read 5 Oct 2026 · github.com
- Cloud privacy
- With an opt-in cloud provider, the question, relevant schema portion, and generated SQL context are sent to that provider; database passwords and query result rows are excluded.Read 4 Oct 2026 · github.com
- Credential security
- Database passwords and cloud API keys are Fernet-encrypted on disk, redacted from logs, and masked in API responses.Read 5 Oct 2026 · github.com
- Database integrations
- The app supports connecting to PostgreSQL and MySQL databases, including multiple databases at once.Read 5 Oct 2026 · github.com
- Database support
- It connects to PostgreSQL and MySQL and can query multiple same-type databases in parallel.Read 4 Oct 2026 · github.com
- Deployment requirements
- The recommended Docker setup requires Docker 20.10+ with Compose v2 and about 10 GB of free disk space; the first run downloads an approximately 5 GB model.Read 4 Oct 2026 · github.com
- Local AI
- Ollama runs locally by default, and the project says questions, database schema, and generated SQL stay on the user's machine with this provider.Read 5 Oct 2026 · github.com
- Local privacy
- With the default Ollama provider, questions, schema, and generated SQL stay on the user's machine, and the app says it has no telemetry.Read 4 Oct 2026 · github.com
- Query limits
- SELECT queries receive a default LIMIT of 100, results are capped at 1,000 rows by default, and each query has a 30-second timeout by default.Read 5 Oct 2026 · github.com
- Query workflow
- Users can inspect and edit generated SQL before execution, and receive live progress across connection, schema, AI, validation, and execution stages.Read 5 Oct 2026 · github.com
- Results
- Results can be sorted and paginated, exported as CSV or JSON, or copied as tab-separated text.Read 5 Oct 2026 · github.com
- Schema retrieval
- Hybrid retrieval uses BM25 and sentence-transformer vectors to select relevant schema context for a question.Read 5 Oct 2026 · github.com
- Write queries
- INSERT, UPDATE, and DELETE are supported by default, with warning banners; the project recommends a read-only database user to block writes.Read 5 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Connects to PostgreSQL and MySQL.
- Users can edit SQL before execution.
- Results export as CSV or JSON.
- Ollama runs locally by default.
- Database passwords and cloud API keys are encrypted at rest.
Limits
- INSERT, UPDATE and DELETE are allowed by default.
- Queries time out after 30 seconds by default.
- Recommended Docker setup needs about 10 GB of free disk space.
- First run downloads an approximately 5 GB model.
Who it suits
Natural Language SQL suits users who want to ask database questions in plain English and inspect generated SQL before it runs. It may also suit teams wanting a local Ollama setup or opt-in cloud model providers.
Natural Language SQL in depth
Read the full write-up
Overview
Natural Language SQL is a self-hosted tool for asking PostgreSQL or MySQL databases questions in plain English and working with the resulting SQL. It best suits developers who want a local AI workflow and the ability to inspect queries before they run. The GPL-3.0 project is free, but its storage requirements and write-enabled defaults deserve attention before deployment.
Key features
Hybrid schema retrieval combines BM25 search with sentence-transformer vectors to select database context for each question. The tool can connect to multiple databases of the same type in parallel, which is useful when questions span several environments. It also provides query explanations. The README reports 52.32% execution accuracy on Spider dev; generated SQL should therefore be reviewed rather than treated as authoritative.
Users can edit the generated SQL before execution, and streamed progress shows the query stages. Results can be sorted, paginated in groups of 50, downloaded as CSV or JSON, or copied as tab-separated text. SELECT queries receive a default LIMIT; explicit result counts are capped at 1,000 rows by default, and execution times out after 30 seconds. These defaults help constrain queries, but do not replace database-level permissions.
INSERT, UPDATE, and DELETE are allowed by default, with warning banners. The project recommends using a read-only database account when writes must be prevented. That is an important setup choice for anyone connecting a production database.
Ollama is the default AI provider, keeping questions, schema, and generated SQL on the user's machine. Choosing OpenAI, Gemini, or Groq sends the question, relevant schema portion, and SQL context to that provider; database passwords and result rows are excluded. The project says it has no telemetry, and that schema metadata, query results, and query history remain in memory for the session rather than being written to disk by the application. Database passwords and cloud API keys are Fernet-encrypted at rest, redacted from logs, and masked in API responses.
Pricing
The Natural Language SQL Engine is free at free under the GPL-3.0 license, for local installation. There are no paid tiers described for this project, so the trade-off is operating the software yourself rather than choosing a hosted plan. Its local model also has a substantial first-run cost in disk space.
Platforms
Natural Language SQL supports API, Linux, macOS, self-hosted, and web use. The recommended Docker deployment requires Docker 20.10 or later and Compose v2, with about 10 GB of free disk space; the first run downloads an approximately 5 GB model. That makes it a better fit for an environment with room for local infrastructure than for a lightweight installation.
Who it's for
This is a sensible option for developers or technical teams who can manage Docker, want SQL they can inspect and edit, and prefer local inference for privacy. It is less suitable for users seeking a turnkey hosted service, or for teams that cannot give the deployment the required disk space. Anyone using it against important data should enforce read-only access at the database level if generated writes are unacceptable.
Pros and cons
Pros: Free, GPL-3.0 software with a local Ollama default and no telemetry, plus editable SQL and visible query progress.
Pros: PostgreSQL and MySQL support, including parallel queries across multiple same-type databases, with practical export and pagination options.
Cons: Docker setup and the local model require about 10 GB of free disk space, including an approximately 5 GB first-run download.
Cons: Write queries are permitted by default, so safe use against protected data depends on database permissions, not warning banners alone.
Cons: The reported Spider dev execution accuracy is 52.32%, a reason to check generated SQL before relying on its results.
Alternatives
AI SQL Generators is a broader category directory for readers comparing tools beyond this self-hosted engine.
Choose Outerbase AI if a free plan for up to five users is more useful than local installation; it includes one base, 10 EZQL queries per month, three saved queries, one dashboard, and transactional databases only.
Text2SQL.ai is a paid alternative with a free trial, API access, and 100 requests per month included on its Pro Plan; additional requests cost $0.05 each.
Wren AI offers an open-source context engine for individual developers through CLI and MCP without a UI, making it a different fit for those who do not need a graphical interface.
QueryPlane has a free plan capped at three apps, one database connection, and 50 AI prompts per month, a fit for smaller prompt-volume needs.
NatureQuery offers a free plan with 50 queries per month, one database connection, Excel and CSV export, and 30-day query history for readers who want a capped hosted option.
SQL Mocker provides a free Explore plan with one user, 50 total AI queries, and five saved projects, useful for a limited individual allowance.
SQLer has a free plan of 50 NL2SQL queries per month for readers comparing a monthly query allowance.
SQLAI.ai is a paid alternative with a free trial and a Hobby plan at $4 a month for 50 queries per month.
Verdict
Choose Natural Language SQL if you want a free, self-hosted SQL assistant that keeps default AI processing local and lets you review queries before execution. Its strongest case is the combination of privacy-minded local inference and editable SQL; look elsewhere if you need a hosted setup or cannot accommodate the Docker and model footprint. For any database where writes are unacceptable, pair it with a read-only account.
Verdict
Natural Language SQL pairs plain-English database questions with editable SQL and streamed query results. Its write-query defaults, limits and Docker requirements are important to account for before deployment.
Where Specifiction places it
- AI SQL Generators#3 of 198.4