Loading...
About SQL Formatter
SQL Formatter is a free online tool designed to beautify and format your SQL queries. It transforms unreadable, minified SQL code into well-structured, easy-to-read scripts with proper indentation and casing. It supports various SQL dialects including Standard SQL, MySQL, PostgreSQL, and more.
How to Use
- Select your SQL dialect (e.g., MySQL, PostgreSQL) from the dropdown menu.
- Choose your preferred indentation (2 spaces, 4 spaces, or Tab).
- Paste your messy SQL code into the editor.
- Click the 'Format SQL' button to beautify your code.
- Copy the formatted result using the 'Copy' button.
FAQs
Which databases are supported?
We support all major SQL dialects including Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, PL/SQL, and T-SQL.
Does it validate my SQL?
This tool focuses on formatting and beautification. While it may fail on severely invalid syntax, it does not perform full semantic validation against a database schema.