SQL Formatter

Format and prettify SQL queries with proper indentation

About This Tool

SQL Formatter is a free browser-based tool that reformats SQL queries into clean, readable code. It's useful for database administrators, backend developers, and data analysts who work with complex or minified SQL.

Paste any SQL statement — SELECT, INSERT, UPDATE, CREATE, or stored procedures — and the formatter adds proper indentation, capitalizes keywords, and aligns clauses for readability. It supports common SQL dialects including MySQL, PostgreSQL, SQLite, and SQL Server.

Ideal for reviewing query logic, sharing code in documentation, or debugging query structure. The formatter runs entirely in the browser, so your queries and data never leave your machine.

Frequently Asked Questions