SQL Formatter

Format and beautify SQL queries.

SQL
Formatted

About this tool

Paste a one-line or minified SQL statement and get a readable, indented query with keywords on their own lines. Great for reviewing generated queries and cleaning up logs.

How to use

  1. Paste your SQL query into the input.
  2. Choose uppercase or lowercase keywords and indent size.
  3. Click Format to get a clean, readable statement.

Examples

Input
select id,name from users where active=1 order by name

Frequently asked questions

The formatter uses common ANSI SQL keywords, which cover MySQL, PostgreSQL, SQL Server, and SQLite for most queries.
No. It only reformats text. It does not connect to any database.
Contact

Let’s connect

Have a Liferay or Backend project you’d like to talk through? Fill in the form and I’ll get back to you.

Book Calendar