Representative example
This example reflects the implemented transformation or analysis.
Input
select id,name from users where active=true order by name;Output
SELECT
id,
name
FROM
users
WHERE
active = true
ORDER BY
name;Format SQL with uppercase keywords and two-space indentation for six selectable database dialects.
Content last reviewed
96 characters · 1 lines
Keywords are uppercased and clauses aligned at 2-space indent — the layout most style guides expect for review-ready queries.
Paste a SQL query and select the closest database dialect.
Standard SQL, PostgreSQL, MySQL, MariaDB, SQLite, and SQL Server.
Check the output or diagnostics, then use the available copy or download control where shown.
This example reflects the implemented transformation or analysis.
Input
select id,name from users where active=true order by name;Output
SELECT
id,
name
FROM
users
WHERE
active = true
ORDER BY
name;Input
select id,name from users where active=true order by name;Output
SELECT
id,
name
FROM
users
WHERE
active = true
ORDER BY
name;SQL Formatter addresses a focused developer workflow without requiring a command-line setup. Format SQL with uppercase keywords and two-space indentation for six selectable database dialects. Results update from the supplied input, making it useful for quick inspection, debugging, documentation, or test preparation.
In this tool, SQL Formatter: processing runs in the browser and the tool does not call an external conversion API. Input remains in page memory unless a confirmed browser feature such as file reading or local settings is described above.
Paste a SQL query and select the closest database dialect.
Configure standard sql, postgresql, mysql, mariadb, sqlite, and sql server.
Review the generated output, status, or validation message.
Copy or download the result when that control is available, and verify it in the destination where it will be used.
The sql-formatter library parses the selected dialect, uppercases recognized keywords, and lays out clauses with a two-space tab width.
SQL text for the six listed dialects.
Incomplete or dialect-incompatible syntax can produce a formatting error.
Use SQL Formatter to prepare or inspect values while implementing a feature.
Run a small known input through SQL Formatter to distinguish formatting or syntax problems from surrounding application behavior.
Create a concise select for tests, documentation, or code review.
The sql-formatter library parses the selected dialect, uppercases recognized keywords, and lays out clauses with a two-space tab width.
During processing, SQL Formatter: the result is rendered directly in the tool interface. Validation failures are displayed instead of being silently treated as successful output.
SELECT
Incomplete or dialect-incompatible syntax can produce a formatting error.
Confirm that the selected mode or syntax matches the source and that the input is complete.
Incomplete or dialect-incompatible syntax can produce a formatting error. Reduce the input to the smallest failing case and confirm the selected controls.
Review the documented limitation for SQL Formatter, then compare a known example with the same mode or syntax before processing a larger value.
Formatting does not execute, validate against a database schema, or prove that a query is safe or correct.
SQL Formatter performs its implemented transformation in the browser without calling an external processing API. Input is held in the current page state, so still avoid unnecessary secrets and clear the field on a shared device.
Keep the original sql text for the six listed dialects before using SQL Formatter.
Exercise the error case described as: Incomplete or dialect-incompatible syntax can produce a formatting error.
Check the result against this limitation: Formatting does not execute, validate against a database schema, or prove that a query is safe or correct.
Start with a small value whose expected result you understand, then add the edge cases relevant to SQL Formatter. Preserve the original when the conversion or formatting is destructive.
Formatting does not execute, validate against a database schema, or prove that a query is safe or correct. Treat the displayed result as an intermediate artifact and test it in the runtime, parser, database, or document where it will actually be used.
Implementation note: SQL Formatter: the sql-formatter library parses the selected dialect, uppercases recognized keywords, and lays out clauses with a two-space tab width.
Developers, QA engineers, technical writers, analysts, and students who need format SQL with uppercase keywords and two-space indentation for six selectable database dialects.
No external processing API is used by this tool; its implemented operation runs in the browser.
SQL text for the six listed dialects.
Incomplete or dialect-incompatible syntax can produce a formatting error.
Formatting does not execute, validate against a database schema, or prove that a query is safe or correct.