Instantly format SQL queries for MySQL, PostgreSQL, MS SQL, Oracle and SQLite. Uppercase keywords, configurable indentation, dialect-aware. 100% browser-based.
The SQL Formatter is a dialect-aware, browser-based tool that instantly beautifies raw or minified SQL queries into clean, consistently indented output. Powered by the sql-formatter library running in a Web Worker, it supports MySQL, PostgreSQL, MS SQL Server (T-SQL), Redshift, and standard SQL — with automatic keyword uppercasing and configurable indentation. Your queries never leave the browser.
QWhich SQL dialects are supported?
MySQL, PostgreSQL, Amazon Redshift, MS SQL Server (T-SQL / MSDAX), and standard SQL. Select the dialect from the language picker to apply dialect-specific formatting rules.
QDoes the formatter validate SQL syntax?
The formatter will surface parse errors from the sql-formatter library if the input is structurally invalid, but it is not a full SQL validator. Use a database client or linter for strict validation.
QIs my SQL data sent to a server?
No. All formatting is performed locally inside your browser using a Web Worker. Your queries never leave your device.
QCan I format stored procedures and multi-statement scripts?
Yes — the formatter handles multi-statement SQL files including stored procedures, DDL (CREATE, ALTER, DROP) and DML (SELECT, INSERT, UPDATE, DELETE) in a single pass.