Menu

SQL Formatter Online for MySQL, PostgreSQL, SQLite, and More

Format SQL online for MySQL, MariaDB, PostgreSQL, SQLite, Oracle, and SQL Server. Choose a dialect and style; your query stays in your browser.

Format a hard-to-read SQL query into a consistent layout. Choose the database dialect so the formatter can handle its syntax, set keyword casing and indentation, then copy the result. Links from database reference pages can preselect a dialect. SQL is processed in your browser and is not sent to SQLiz.

The formatter needs JavaScript to run in your browser. Enable JavaScript and reload this page.

SQL Formatter uses a dialect-aware SQL formatting library. It may not support every database extension or stored procedure syntax, and formatting can change how a query is laid out without proving that it is valid. Review the result before using it.

This tool uses SQL Formatter, licensed under the MIT License.

Frequently asked questions

Is my SQL uploaded?

No. The formatter runs in your browser. SQL text is not included in SQLiz analytics events.

Does formatting check whether the SQL is valid?

No. The formatter arranges SQL for readability; it does not connect to a database, execute statements, or confirm that a query is valid for your server version.

Why must I select a database dialect?

SQL syntax varies between database systems. Selecting MySQL, MariaDB, PostgreSQL, SQLite, Oracle PL/SQL, or SQL Server T-SQL helps the formatter recognize dialect-specific tokens. It does not translate the query to another database.

Can I run the result on SQLiz?

For SQLite, the formatter can pass the formatted query to the SQLite SQL playground in this browser tab. The query is not run automatically; review it and click Run SQL. Only the SQL is passed: the playground opens a fresh sample database, and any local database file must be reopened there. The playground does not run MySQL, PostgreSQL, Oracle, or SQL Server SQL.