SQL Formatter

Paste a SQL query below and click the dedicated "Format SQL" button in the toolbar to clean up indentation and capitalize keywords consistently.

This uses a real SQL-aware formatter (not a generic text reflow), so it understands SELECT/JOIN/WHERE clause structure.

Secure & Private: Your data is sent to our server only to perform the conversion, then immediately discarded — nothing is logged or stored.
Input Stats Lines: 0 Words: 0 Chars: 0 Size: 0 KB
Output Stats Lines: 0 Words: 0 Chars: 0 Size: 0 KB
System Status: Ready

Preview

Input

Input statistics are shown in the status bar above.

Output

Output statistics are shown in the status bar above.

Results are provided for informational purposes only and may contain errors. Please verify important information independently. Use of this tool is at your own risk.

Frequently Asked Questions

Does this work for INSERT statements too?

Yes - and if you’re working with INSERT statements specifically, see also the SQL to JSON and JSON to SQL converters.