SQL Syntax Checker (PostgreSQL)
This SQL syntax checker validates PostgreSQL syntax with Postgres's own parser, with the line of any error, before you run it.
Waiting for input
What you get
- A PostgreSQL syntax checker that uses Postgres's own parser, with the line of any error: validate SQL online before you run it.
- Valid SQL is shown formatted, ready to copy.
- A SQL validator for PostgreSQL: check SQL query online before you run it, without a database connection.
- Private and free: everything runs in your browser, nothing is uploaded, and there is no sign-up.
How each result is checked
- Parsed with the real PostgreSQL parser (libpg-query, compiled to WebAssembly), the same code Postgres uses.
- Valid SQL is shown formatted, and that output is checked to parse to the same syntax tree.
What can't convert exactly
- This checks syntax only. Whether tables and columns exist is only known to your database.
Questions
Is my data uploaded?
No. Everything runs in your browser, in a background worker. Nothing is sent to a server.
Which SQL dialect does it check?
PostgreSQL. The query is read by the PostgreSQL parser itself, so a query that passes here parses the same in Postgres. MySQL- or SQL Server-only syntax is reported as an error.
Why does my query pass here but fail in the database?
This checks syntax. Whether tables, columns and functions exist, and whether types match, is only known to your database.
How do I use the SQL Syntax Checker (PostgreSQL) online?
Paste your input or open a file on the left. The result appears on the right as you type, already checked; copy or download it. Nothing is uploaded: the SQL Syntax Checker (PostgreSQL) runs in your browser.