SQL Formatter

Format and beautify your SQL queries.

Runs in your browser — your data never leaves your device

Frequently Asked Questions

What is a SQL formatter?

A SQL formatter takes messy, minified, or poorly formatted SQL queries and outputs clean, properly indented, and readable code following SQL best practices.

How do I format my SQL?

Paste your SQL query into the input area and click format. The tool instantly reformats the query with proper indentation, line breaks, and keyword capitalization.

What formatting rules does it apply?

The formatter applies consistent indentation for nested clauses, line breaks between major SQL elements (SELECT, FROM, WHERE, JOIN), keyword capitalization, and proper spacing around operators.

Does it support all SQL dialects?

The formatter supports standard SQL and common dialects including MySQL, PostgreSQL, and SQL Server. It handles most standard SQL syntax correctly.

Is this tool free?

Yes, ToolDock's SQL formatter is completely free, requires no signup, and runs entirely in your browser.