Code / FREE ONLINE TOOL
SQL Formatter & Minifier
Format SQL queries online with clean indentation and uppercase keywords, or minify SQL to one line. Works with MySQL, PostgreSQL, SQLite and SQL Server queries.
QUICK GUIDE
How to use this tool
Paste one or more statements and choose Format or Minify. Clauses start new lines, select lists and conditions are indented and subqueries are nested. Strings, quoted names and comments stay as they are; Minify keeps optimizer hints such as /*+ ... */ and /*! ... */.
Your input is processed locally. Use Copy or Download to keep your result.
Keep your workflow moving
Need another step? Try a related tool.