What this checks
This looks for mechanically detectable mistakes in SQL: unbalanced parentheses, an unterminated string or quoted identifier, an unclosed block comment, a trailing or leading comma, an unmatched CASE/END pair, and statements that look like they're missing a semicolon between them. These are exactly the kind of typos that are easy to miss by eye in a long query but immediately break it.
PostgreSQL, MySQL, and SQL Server syntax
The structural mistakes this catches — unbalanced parentheses, unterminated strings, stray commas, an unclosed CASE — are the same kind of typo regardless of which database you're targeting, and the tokenizer understands each dialect's own quoting conventions rather than assuming one: backtick-quoted identifiers (`MySQL`-style), double-quoted or bracket-quoted identifiers ("PostgreSQL" and [SQL Server]-style), and $1/$2 positional parameters (PostgreSQL-style) are all handled correctly, not misread as syntax errors.
What this isn't
This is not a full SQL parser and it doesn't know your database schema. It won't catch a misspelled column name, an ambiguous join, a type mismatch, a dialect-specific keyword or function that doesn't exist, or anything else that requires understanding what your tables actually look like or which database engine will run the query — those errors only surface against a real database connection. Passing here means "no obvious structural mistakes," not "guaranteed to run."
Errors vs. warnings
- Errors — things that are definitely broken: unbalanced parentheses, an unterminated string, a trailing comma before a clause. These will fail to parse basically anywhere.
- Warnings — things that are unusual and worth a second look, but not necessarily wrong: a query that doesn't start with a recognized statement keyword, or what looks like two statements running together without a semicolon between them.
Want real examples, not just categories?
See Common SQL Syntax Errors for each of these verified against a real database — including the ones that don't error at all, like a missing comma that silently becomes a column alias instead of breaking the query.
How this is computed
Checking happens entirely in your browser via a small hand-written tokenizer — the same approach behind SQL Formatter and SQL Minifier. Your SQL is never sent anywhere.