Format, beautify and indent SQL queries with keyword capitalization
A SQL formatter takes a cramped or messy SQL query and rewrites it with consistent indentation, line breaks and keyword capitalisation, turning a single dense line into a readable, structured statement. SQL that arrives from logs, an ORM or a hastily typed query is often all on one line, which makes a complex SELECT with several joins and conditions genuinely hard to read. Formatting puts each clause — SELECT, FROM, WHERE, JOIN, GROUP BY — on its own line so the shape of the query becomes obvious at a glance.
Readable SQL is not cosmetic; it is how you catch bugs. When clauses are aligned and keywords stand out, a missing join condition, a misplaced parenthesis or a filter in the wrong place is far easier to spot than in a wall of text. Consistent capitalisation (uppercase keywords, lowercase identifiers is a common convention) also makes the structure scannable. This tool formats the query in your browser, so even queries containing table names or business logic never leave your machine.
No. A formatter only adjusts whitespace, line breaks and the capitalisation of keywords — none of which affect how SQL runs. The query produces exactly the same result; it simply becomes easier to read and review.
SQL itself is case-insensitive for keywords, but a common convention is uppercase keywords (SELECT, WHERE) and lowercase identifiers, so the structural words stand out from your table and column names. It is purely for readability, not required by the database.
Standard SQL formatting handles the common clauses and syntax shared across databases like PostgreSQL, MySQL, SQL Server and SQLite. Highly dialect-specific or vendor-only syntax may format less perfectly, but the core structure of typical queries formats reliably.
No. Formatting runs entirely in your browser, so the query — including any table names, column names or embedded values — is never uploaded. You can safely format queries that reflect private schema or business logic.
UUID Generator · Timestamp Converter · Base64 Encoder · Base64 Decoder · Hash Generator · Color Converter