Skip to content

Choose your path

Built around the job you need to finish

Prepare a readable SQL review with the actual dialect and literals intact, without implying the query is valid, safe or optimized.

Backend engineer

Prepare a dialect-specific query review.

Choose PostgreSQL, format a query with dollar strings and parameters, inspect literals, copy the output.

Receives readable SQL with original literal values and unbound parameters.

Database reviewer

Detect unsupported syntax without mistaking formatting for validation.

Try an unterminated string, select the correct dialect, correct the source and rerun.

Sees an explicit error with no partial output, then a current result and database-testing caveat.

Mobile project collaborator

Save readable SQL without overwriting another tool’s notes.

Use named selects and buttons on a narrow screen; format, copy, explicitly save and return to Project Data.

Distinct sourceSql, formattedSql and sqlFormattingWarning values remain inspectable.

Was this tool helpful?

Reference & details

How it works

Dialect-aware token formatting

SQL Formatter 15.8.2 formats one selected dialect. Keyword casing is separate from string literals and quoted identifiers. Parameters are not substituted and no database is contacted.

Bounded local execution

An explicit run loads the language engine in a disposable worker. Cancellation and a wall-clock timeout prevent abandoned work from updating results. Input code is never executed.

Review current output

Input or option changes invalidate old output. Copy/download contain code only, not an appended report. Formatting is not automatic repair or runtime validation.

Updated: August 2026

Example Scenarios

Format a PostgreSQL query containing dollar strings and $1 parameters; compare literal values before sharing the review.

Switch from Standard SQL to PostgreSQL for dollar-quoted strings, then rerun after an explicit parser error.

Save the source, formatted SQL and SQL-specific warning to the REST API Project without overwriting the JavaScript review note.

FAQ

No. A whitespace formatter is not a database parser, security review or query optimizer. Unsupported syntax can fail; some incomplete queries can still be formatted. Run your own database tests.

Choose the database you actually use. Standard SQL is a common subset, not automatic detection. Procedural SQL, client commands and template placeholders may be unsupported.

This workspace formats only. It does not remove comments, rewrite literals, bind parameters or repair queries. Review changes before replacing source.

Code is processed in a local worker, not uploaded or automatically saved. Engine assets may need a connection on first use. An explicit Project save stores source, result and notes on this device; do not save secrets.

Input is limited to 100,000 characters and output to 300,000. Runs stop after 10 seconds. File imports are limited to 400,000 bytes; Project saves require source and output each within 100,000 characters. Editing input or settings requires a new run.

About SQL Formatter

Choose Standard SQL, PostgreSQL, MySQL, SQLite or SQL Server. Compare source and formatted text before copying, downloading or explicitly saving a review to the REST API Project.