SQL Formatter

Format and beautify SQL queries with proper indentation. Supports MySQL, PostgreSQL, SQLite, and more SQL dialects.

Input
Paste your SQL query
Formatted Output
Formatted SQL will appear here
Formatted SQL will appear here...

Frequently Asked Questions

What SQL dialects are supported?

This formatter supports standard SQL, MySQL, PostgreSQL, SQLite, BigQuery, and MariaDB dialects. Each dialect has specific syntax rules and keywords that the formatter recognizes.

Does the formatter change my SQL logic?

No, the formatter only changes whitespace and capitalization. Your SQL logic, table names, column names, and values remain exactly the same. Only the visual formatting is modified.

Can I uppercase SQL keywords?

Yes, you can toggle the uppercase keywords option to automatically convert SQL keywords like SELECT, FROM, WHERE, JOIN, etc. to uppercase while leaving your identifiers and values unchanged.

What indentation options are available?

You can choose between 2 spaces, 4 spaces, or tab characters for indentation. The indentation is applied consistently to subqueries, JOIN clauses, and other nested SQL constructs.

Is this tool free to use?

Yes, this SQL formatter is completely free with no signup required. All formatting happens in your browser so your queries never leave your device.

Related Tools