SQLFormat is a free online formatter for SQL statements. Enter your SQL statement in the textarea below and click "Format SQL" [Ctrl+Enter]. To upload a file use the button right below the textarea.

In addition to this web interface SQLFormat provides an API. Or you can download the Python module that powers this service to use it in your own applications. See source code for details.

Accepted file types are plain text files and SQLite3 databases, maximal file size is 1 MB.
Coming from sqlformat.appspot.com?

As announced earlier sqlformat.appspot.com is deprecated.
Read more about this site and upcoming features

Formatting Options
spaces
Empty field means leave indentation unchanged.
This software is in development.
What happens with donations?
Formatted by SQLFormat.org (http://sqlformat.org)
After you have formatted a SQL statement you'll see the formatted statement here, ready for printing.