SQL query builder — write a SELECT without the syntax
This one runs in your browser. Nothing you type leaves this page, and it costs nothing. The output updates as you type.
Before and after
What you mean, and the statement that says it.
from: sales.orders where: region = North or: region = West order by: total desc
SELECT * FROM "sales"."orders"
WHERE ("region" = 'North' OR "region" = 'West')
ORDER BY "total" DESC;What this tool does
This tool writes a SELECT statement from a few plain lines — from which table, which columns, which conditions, in what order, how many rows — in the dialect you pick: PostgreSQL, MySQL, SQLite or SQL Server. Conditions on separate "where" lines are joined with AND; an "or" line is joined to the condition above it, and the brackets are put where they belong. Every table and column name is written as a quoted identifier and every text value as a quoted literal, so nothing you type can end up running as SQL. It writes the query; it does not connect to a database or run anything. Everything happens in your browser.
What happens to your file
Your file never leaves your device. This page opens it, changes it and saves the result in your browser; nothing is uploaded, so there is no copy on our servers to delete.
No AI provider sees it either. The page sends us one count that a run happened — no file, no name, no size. Details on the privacy page.
Questions
Which databases does it write for?
PostgreSQL, MySQL, SQLite and SQL Server. They quote names differently — double quotes, backticks, square brackets — and the tool writes each one's own way.
Can something I type break out and run as SQL?
No. Names become quoted identifiers and values become quoted literals, with any quote inside them doubled, so an apostrophe or a semicolon in a value is data and stays data.
Does it run the query?
No. It writes the statement and nothing else; there is no database connection. Copy it into the tool you already use.
Is my text uploaded anywhere?
No. The query is written by code on this page, in your browser. Nothing is sent to our servers, so table and column names from an internal schema stay on your machine.
Is it free?
Yes, with no account and no daily limit. It runs on your own device, so it costs us nothing to offer.
Related tools
- Regex tester — build and test a regular expressionPaste some text and a regular expression and see every match, its line and column, each capture group, and the pattern explained token by token. Runs in your browser.
- Cron expression builder — and the next five runsPaste a cron expression or build one from a form, read it in plain English, and see exactly when it will next run in the timezone you choose. Runs in your browser.
- Convert an invoice PDF to SQLTurn an invoice's line items into a CREATE TABLE and INSERT statements you can run against your own database. Your file is deleted after two hours.
Text & data
On ExploreMyData, our sister site
- Run SQL on a CSV file in your browser, on ExploreMyDataWant to run the query on a spreadsheet you have? The sister site does that.