Skip to content
Developer Runs offline

SQL Formatter

Beautify or minify SQL for MySQL, PostgreSQL, SQLite and SQL Server, without ever executing it.

Action

Input

0 chars

Output

0 chars
Ctrl

Questions

Does this run or validate my SQL against a real database?

No. This is a pure text transform - a tokenizer that recognises strings, identifiers and comments well enough to reformat or strip them safely. It never connects to a database and never executes anything.

Will formatting ever change what a string literal contains?

No. The tokenizer treats every quoted string, backtick or bracket identifier, and dollar-quoted block as one opaque unit whose contents are never touched, even if they contain something that looks like a keyword or a comment marker.

What does the dialect setting actually change?

Which quoting styles are recognised as identifiers (backticks for MySQL, brackets for SQL Server, dollar-quoting for PostgreSQL) and a handful of dialect-specific keywords. It is not a full parser for any one database - reasonably standard SQL formats correctly regardless of dialect.

Open Code Formatter

Code Formatter

Format or conservatively minify HTML, CSS, JavaScript, JSON, XML, SQL and PHP, one tool for all seven.

Developer
Open JSON Formatter

JSON Formatter

Format, indent and inspect JSON with clear error reporting.

JSON
Open Cron Parser

Cron Parser

Translate a cron expression into plain English and next run times.

Developer