Format and beautify SQL queries instantly. Keywords uppercased, predictable indentation, multi-dialect syntax.
Free online SQL formatter. Beautify messy queries with consistent indentation and uppercased keywords. Works with PostgreSQL, MySQL, SQL Server and SQLite syntax.
No. It only rewrites the whitespace and casing. The query is never parsed semantically, connected to a database, or sent anywhere. You can safely paste production queries; the formatter runs entirely in your browser.
It handles the common subset used by PostgreSQL, MySQL, SQL Server and SQLite, sELECT, INSERT, UPDATE, DELETE, JOINs, CTEs, window functions, and subqueries. Vendor-specific extensions (Postgres arrays, MySQL ENUMs) pass through untouched.
Single-line comments (--) get detached from their line when the formatter re-indents the statement. Prefer block comments (/* … */) placed on their own line for formatter-stable output.