Beautify SQL Online — Free SQL Beautifier

Beautify SQL queries with dialect support and keyword casing. All processing happens in your browser, with no uploads.

Loading…
SQL Beautification
Beautify SQL online. Consistent indentation and spacing, processed in your browser with no uploads.

Features

Format with dialect and keyword casing.

Beautify SQL

Format with dialect and keyword casing.

Basic example

SQL source

SELECT c.id, c.email, o.total, o.created_at FROM customers AS c INNER JOIN orders AS o ON o.customer_id = c.id WHERE c.active = TRUE AND o.status = 'completed' ORDER BY o.created_at DESC LIMIT 50;

Beautified SQL

SELECT c.id, c.email, o.total, o.created_at FROM customers AS c INNER JOIN orders AS o ON o.customer_id = c.id WHERE c.active = TRUE AND o.status = 'completed' ORDER BY o.created_at DESC LIMIT 50;

Options

SQL Dialect
Target dialect for beautify formatting (standard, PostgreSQL, MySQL, SQLite).
Keyword Case
Upper, lower or preserve keyword casing during beautify.
Indent Width
2 or 4 spaces for beautify and unminify output.

Dialect support

Beautify supports standard SQL, PostgreSQL, MySQL and SQLite dialects. Minify uses whitespace stripping. Edge cases in T-SQL or BigQuery are out of scope.

FAQ about beautifying SQL

Beautification

Which dialect should I pick?

Match your database engine: postgresql for Postgres, mysql for MySQL, and so on.

Minify vs beautify?

Beautify for readability; minify SQL to shrink size.

Is my SQL uploaded to a server?

No. Beautification runs entirely in your browser. Your SQL never leaves your device and is not stored by FastMinify.

Beautify or unminify: which should I use?

Beautify formats readable SQL; unminify restores compressed output (try the SQL unminifier). For day-to-day formatting, stay on SQL beautifier.

Can I customize indentation?

Yes. Pick 2 or 4 spaces in the Beautify options toolbar.

Make code readable with consistent indentation. Beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.