SQL Formatter

Format SQL by dialect while retaining comments, strings and quoted names. Choose indentation and keyword case, then copy or download query.sql.

Input

Up to 1000000 UTF-16 input units, 50000 tokens, 64 levels and 5000 statements; at most 2000000 output units and 30 seconds per task.

Formatting options

Quotes, comments and parameters follow the chosen dialect. Case options change keywords while retaining strings and quoted names.

Enter SQL, select its dialect and format, or load the sample.

SQL Formatter

Format SQL by dialect while retaining comments, strings and quoted names. Choose indentation and keyword case, then copy or download query.sql.

Usage guide