SQL formatter

Put each major clause on its own line and uppercase keywords. Free, and your data never leaves your browser.

Input
Result
Ad space: paste your AdSense code here

How to use it

  1. Paste your query into the input box.
  2. Leave Uppercase keywords ticked, or untick it.
  3. Copy the formatted query.

Frequently asked questions

Does it change my query?

No. It only changes spacing, line breaks and keyword case. Text inside quotes is left alone.

Which SQL dialects work?

It handles common keywords used across SQL Server, MySQL, PostgreSQL and Oracle. Very complex queries may need manual tidying.

More SQL tools

๐Ÿ“‹ List to IN clausePaste a column from Excel and get a quoted, comma-separated list for WHERE ... IN (...).๐Ÿ”„ Rows โ†” columnsSwap pasted data so vertical becomes horizontal, and the other way round.โœ‚๏ธ Split to rowsTurn one line like a,b,c into one value per row.๐Ÿ“ฅ Excel to INSERTPaste rows copied from Excel and get one INSERT statement per row.โš–๏ธ Compare two listsFind what is in one list but not the other, what both share, or all unique values.๐Ÿงน Clean & sort linesTrim spaces, remove duplicates, sort, change case, and add text to every line.