tools.voiddo.com

sqlfmt · sql formatter & beautifier

Format and beautify SQL queries for MySQL, PostgreSQL, MariaDB, SQLite, Transact-SQL, and Standard SQL. Auto-formats as you type. Zero server — runs in your browser.

input sql
auto-formats 250ms after you stop typing · ctrl+enter to format now
formatted output

comparing tools? sqlfmt vs sqlformat.org →

frequently asked questions

What SQL dialects does sqlfmt support?

sqlfmt supports six dialects: Standard SQL (ANSI), MySQL, PostgreSQL, MariaDB, SQLite, and Transact-SQL (Microsoft SQL Server / Sybase). Switching dialect changes which keywords are recognised, how identifiers are quoted, and how dialect-specific functions are formatted.

Does sqlfmt send my SQL to a server?

No. sqlfmt runs entirely in your browser using the open-source sql-formatter JavaScript library. Your query never leaves your machine. There is no logging, no analytics on the query content, and the tool works offline once loaded.

Should SQL keywords be uppercase or lowercase?

It is a style choice. Most established style guides — Mozilla's, Simon Holywell's SQL Style Guide, and Google's SQL guidelines — recommend uppercase reserved words (SELECT, FROM, WHERE, JOIN) so they stand out from identifiers. sqlfmt defaults to uppercase keywords but the toggle lets you preserve original casing.

What is the difference between MySQL and PostgreSQL formatting?

MySQL uses backticks for identifier quoting and has dialect-specific keywords like LIMIT … OFFSET. PostgreSQL uses double quotes for identifiers and supports OFFSET … LIMIT, RETURNING, LATERAL joins, and array operators. sqlfmt switches grammar based on the selected dialect.

Can sqlfmt format a large query?

Yes. The underlying sql-formatter library handles queries up to several megabytes. Formatting runs locally so there is no upload limit. For very large dumps with many statements, expect a brief pause while the parser walks the tree.

power user?

use this daily? tools.voiddo Pro · $9 one-time

supports 66 free tools · Pro license via Paddle · one flat price, no subscription