PostgreSQL SQL validator
Paste any PostgreSQL and get a verdict from the real Postgres parser, not a regex approximation. Line-level errors with caret positioning, free, private, instant.
Frequently asked questions
Why do I get "syntax error at or near"?
That is PostgreSQL telling you the exact token where parsing failed, usually a missing comma, a misplaced keyword, or a typo just before the quoted word. Paste the query here and the validator points at the precise line and column, which is almost always one token after the real mistake.
Is it free?
Yes, completely free with no signup. Validation runs in your browser via WebAssembly, so even large migration files check instantly.
Is my SQL uploaded anywhere?
No. The real PostgreSQL parser runs as WebAssembly entirely in your browser. Your SQL is never uploaded, stored, or logged, safe for production queries.
Which PostgreSQL features are supported?
Everything the real parser accepts: SELECT with CTEs and window functions, DDL, DML, dollar-quoted bodies, casts, arrays, jsonb operators, and procedural blocks. If PostgreSQL 18 accepts it, this validator accepts it.
Can I turn valid schema SQL into an ER diagram?
Yes. When your SQL validates and contains CREATE TABLE statements, a Visualize button appears that opens it in dbdiagramr as an interactive ER diagram.
Related tools
Turn it into an ER diagram
Paste your PostgreSQL connection string and get an interactive ER diagram of your own schema in under 10 seconds. No signup required.