Format SQL Online
Paste SQL into the editor or upload a file and click "Format": the code is re-indented and laid out the same way everywhere, so it is easy to read, review and compare. Choose the indentation you like and copy or download the result.
Pick your SQL dialect — standard SQL, MySQL, MariaDB, PostgreSQL, SQL Server (T-SQL), SQLite, Oracle PL/SQL, BigQuery, Snowflake or Redshift — so its functions and syntax are recognised, and whether keywords are written in UPPERCASE, lowercase or as they are.
Why Use This Tool?
- Clean, consistent layout in one click
- Syntax highlighting and line numbers
- Errors shown with line and column
- Free, no registration, works in your browser
How to Format SQL
- Paste your SQL or upload a file
- Choose the options and click "Format"
- Copy the result or download it
Frequently Asked Questions
Is this tool free?
Yes, it is completely free, with no registration and no limits.
Does it change what my query does?
No. Only white space, line breaks and, if you choose, the case of keywords change; names, strings and values stay exactly as they are.
Is my code sent anywhere?
No. Everything runs in your browser: the code you paste or the file you choose never leaves your device.