Free online SQL formatter for MySQL, PostgreSQL, SQLite and more. Beautify complex queries, indent nested statements and make your SQL human-readable.
SQL (Structured Query Language) is the standard language for managing and querying relational databases. Complex queries with multiple JOINs, subqueries, and nested conditions can quickly become unreadable when written on a single line or with inconsistent formatting.
Our SQL Formatter parses your query and rewrites it with consistent indentation, keyword casing, and line breaks. It supports five major SQL dialects and runs entirely in your browser using the industry-standard sql-formatter library.