Why format your SQL code?
SQL (Structured Query Language) is a permissive language. A query works technically the same whether it is written on a single line or spread over 50 lines. However, queries generated by server logs, ORMs (such as Eloquent, Hibernate or Prisma) or exported through database dumps often come as compact, unreadable blocks.
SQL formatting (beautifying) restructures this text to make it understandable to a human by applying several standard development rules:
- Converting all reserved keywords (SELECT, FROM, WHERE, JOIN...) to UPPERCASE.
- Adding line breaks before the main clauses.
- 4-space indentation for subqueries and complex conditions (AND, OR).
Handling different database dialects
Although the ANSI SQL standard exists, each major database management system (DBMS) has its own specific functions, data types and operators.
Our tool lets you select the exact dialect of your database (MySQL, PostgreSQL, Microsoft SQL Server, etc.). The algorithm adapts the formatting to respect the unique syntax of your technology (for example, handling backticks ` in MySQL or double quotes " in PostgreSQL).
Privacy and security
Your SQL queries often contain table names, architecture structures or sensitive data. This tool is designed to run entirely on the client side in your browser. No query is sent to or saved on our servers.