NL → SQL Builder
Describe a query in plain English; a local model writes the SQL — your schema stays private.
Describe a query in plain English and get SQL for Postgres, MySQL, or SQLite. Free text-to-SQL converter that writes queries from natural language, in your…
About NL → SQL Builder
NL → SQL Builder is a free, browser-based tool that turns a plain-English request into a single SQL query for PostgreSQL, MySQL, or SQLite. You pick a dialect, optionally paste your table schema, and a local AI model writes the SELECT/aggregate query — using dialect-correct syntax like LIMIT vs TOP, DATE_TRUNC vs YEAR(), and strftime(). The model runs entirely in your browser (a small built-in WebGPU model) or against your own local server such as Ollama or LM Studio, so your schema and query text never leave your device, and there is no signup.
How to use NL → SQL Builder
- Choose your database dialect — PostgreSQL, MySQL, or SQLite — so the generated SQL uses the right functions and syntax.
- Optionally paste your schema, one table per line in the form table(col1, col2, …), or click 'Sample' to load an example; the model only uses columns you list.
- Type what you want in plain English (e.g. 'customers in Canada with more than 3 orders this year') in the request box.
- Click 'Generate SQL' (or press Enter); use 'Stop' to interrupt a slow or runaway run.
- Review the generated SQL — watch for any dialect warning banner — then click 'Copy' to use it, or 'Regenerate' to try again.
Frequently asked questions
- Is my schema or query uploaded to a server?
- No. Everything runs locally — either a small model inside your browser or your own local server (Ollama / LM Studio) — so your schema and request never leave your device and nothing is sent to a cloud API.
- Is it free and do I need an account?
- Yes, it's completely free with no signup or account; you just need a local AI model connected, which you set up from the 'AI' chip.
- Which SQL dialects does it support?
- PostgreSQL, MySQL, and SQLite. The selected dialect tailors the syntax — for example LIMIT instead of SQL Server's TOP, and date handling via DATE_TRUNC, YEAR()/CURDATE(), or strftime().
- Do I have to provide a schema?
- No, the schema is optional, but adding it greatly improves accuracy because the model is told to use only the tables and columns you list. Use the form table(col1, col2, …), one table per line.
- Are there input length limits?
- Yes. The schema is capped at 2000 characters and the request at 1000 characters; longer input is rejected up front so the model doesn't truncate the query mid-statement.
- Why does my complex query come out wrong?
- The small in-browser model handles simple lookups well but can struggle with multi-table joins, CTEs, and window functions. For complex queries, connect your own local server (Ollama / LM Studio) for much better SQL, and always review the output before running it.
People also search for
NL → SQL Builder is also known as text to sql, natural language to sql, english to sql query, generate sql from text, ai sql query writer, convert plain english to sql, sql query generator.