
SQL formatter, beautifier and minifier
Paste a SQL query to format it for reading, in the style of your database. Your queries (and any table names or data in them) never leave your browser.
Runs in your browser. Pasted data never leaves it.
How to use it
- Paste your SQL or drop a file on the box.
- Choose Beautify to make it readable or Minify to make it small, and adjust the options.
- Press Run (it also runs as you type).
- Copy or download the result.
Questions
Which SQL dialects are supported?
Standard SQL, PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), Oracle PL/SQL, BigQuery, Snowflake, Redshift, Spark and Hive. The dialect decides how quoting, functions and keywords are recognised: if formatting fails, try another dialect.
Does minifying change what the code does?
No. Comments and whitespace are removed; strings and quoted names are left exactly as they are.
Is my code uploaded?
No. Formatting and minifying run in your browser, and your code never leaves your device.
How much smaller does it get?
The size of the result is shown under the output. Typical savings are 20–40% for CSS, 15–30% for HTML and 40–70% for JavaScript before gzip, and less after.
Is what I paste or test sent anywhere?
No. This page works entirely inside your browser, and pasted data never leaves your device. It makes no network requests while you use it, and the page also tells your browser to block them (a Content-Security-Policy with connect-src 'none'), so even a bug could not send your data out. To check it yourself, open your browser's developer tools, go to the Network tab, and use the tool: nothing will appear. There is no account, no analytics and no logging.
