PostgreSQL formatter and syntax validator
Format a PostgreSQL query into readable, indented SQL and check its syntax, without running it against any database.
- Runs in your browser
- No upload
- Result stays on your device
Privacy & limitsRuns in your browser. Nothing is uploaded.
Input content stays in this tab; Refentra does not upload or store it. Optional aggregate action counts are sent only with your usage consent. Clear the workspace when finished.
Supported profile: PostgreSQL grammar subset; syntax only, no execution or schema checks. 30,000 units.
Maximum text: 200,000 UTF-16 units; parser limits can be smaller. Worker time limit: 15 seconds (regex 1.5 seconds).
Check the input and the result
- Prepare and choose the operation
Paste a PostgreSQL-style statement to check its syntax and format it so it is easier to read. No database is connected.
- Check a concrete example
Use this sample and compare the indicated result: select id from users where active = true; → select id from users where active = true;
- Check the output before you reuse it
After formatting, compare the clauses and quoted identifiers. Valid syntax still has to be tested against your real database schema.
Answers for this task
Is the query executed?
No. No database connection is opened. The parser can't confirm table names, permissions, performance or returned rows.
What should I check if the input fails?
Check quotation marks and parentheses. A statement that is specific to another SQL dialect may be outside the supported PostgreSQL subset.
Where does this tool stop?
Syntax help is not protection against injection or an execution plan. Parameterize queries in your application separately.