Visual SQL Query Builder
This tool lets you build SQL queries through a visual interface directly in your browser. Select tables, pick columns, add joins, set filters, and choose sort orders without writing SQL by hand. The tool generates the corresponding SQL statement in real time. No data is sent to a server. Your schema details, table names, and query logic stay on your device. The tool is free, requires no account, and works offline after the page loads.
100% client-side. Query draft stays in your browser (ons-sql-builder-inputs).
This tool builds syntactically correct queries but does not execute them. Test against your actual database.
Tables
SELECT columns
WHERE filters
No filters yet.
JOINs
No joins yet.
ORDER BY
SQL output
SELECT
*
FROM `users`How this tool works
The SQL query builder generates SELECT statements through a visual interface without requiring manual SQL syntax. You select a base table, then add JOINs by choosing join type (INNER, LEFT, RIGHT, FULL OUTER) and the matching column pair. The WHERE clause builder adds filter conditions using dropdown operators (equals, not equals, greater than, less than, contains, IS NULL, IN list) connected by AND or OR. The SELECT list uses checkboxes per column with optional column aliases. ORDER BY and LIMIT/OFFSET controls handle sorting and pagination. GROUP BY and aggregate functions (COUNT, SUM, AVG, MIN, MAX) become available when aggregation mode is toggled. The generated SQL updates in real time with keyword capitalization and consistent indentation. Key assumption: the builder generates syntactically valid SQL for the selected dialect (PostgreSQL, MySQL, SQLite) but does not validate that the specified tables or columns actually exist in any live database. Edge case: subqueries and window functions (OVER, PARTITION BY, ROW_NUMBER, RANK) are not constructable through the visual interface. For queries requiring these constructs, the tool provides a raw SQL editor panel alongside the visual builder where you can paste or type the generated SQL and manually add window functions, subqueries, or CTEs before copying the final output.
Worked example
With users and orders tables, a LEFT JOIN on user id plus filters for active status and age over 25 produces a ready-to-paste SELECT you can run in pgAdmin or MySQL Workbench.
Frequently asked questions
Is my query or schema sent to a server?
No. The query builder runs entirely in your browser. The table names you type, the schema you paste, and the generated SQL all stay in your browser's memory. There is no network request at any point. Verify this with your browser's DevTools Network tab.
Does it execute the query against my database?
No. The tool generates SQL text only. It does not connect to any database. To run the query, copy the SQL output and paste it into your database client (pgAdmin, DBeaver, DataGrip, MySQL Workbench, or a command-line client).
Which SQL dialects does it support?
The tool generates ANSI-standard SQL by default. You can select a dialect (PostgreSQL, MySQL, SQLite, SQL Server) from the options to adjust syntax differences like quoting style (double quotes vs. backticks vs. square brackets), LIMIT vs. TOP, and OFFSET syntax.
Can it build INSERT, UPDATE, and DELETE statements?
Yes. Switch the query type from the dropdown at the top. For INSERT, the tool provides a row editor where you enter values per column. For UPDATE, you specify SET assignments and a WHERE clause. For DELETE, you specify the WHERE clause. All three types generate formatted SQL in real time.
Can I paste my database schema to populate the dropdowns?
Yes. Paste your CREATE TABLE statements into the Schema input area. The tool parses the table names, column names, and data types and uses them to populate the dropdown menus. This eliminates the need to type column names from memory.
Can I save and load queries?
Queries are stored in your browser's local storage. You can save a query with a name and load it later in the same browser. No data is sent to a server. Clearing your browser data will remove saved queries.