SQL Formatter

Formats any SQL query with your desired indentation level, even if your SQL statement is invalid. You can modify the case of the SQL keywords and identifiers to upper case, lower case or keep them as-is.

This SQL beautifier is especially useful for SELECT statements, but can also handle INSERT, UPDATE and DELETE statements. It was built to be agnostic of the database that is targeted and should support MySQL, Microsoft SQL Server, Oracle and other SQL ANSI databases.

Option 1: Copy-paste your SQL query here
Option 2: Or upload your SQL document
Indentation level:
Change case of SQL keywords (select, from, where, etc.):
Change case of identifiers (tables, columns, etc.):
Force output to new window: