SQL Formatter

Format SQL queries for readability.

Input data is processed in your browser
Data is never sent to a server

Tool

0 chars

or drag & drop a file

What is SQL Formatter?

SQL Formatter reformats poorly indented or single-line SQL queries into a clean, readable structure. It helps with code reviews and debugging complex queries with JOINs and subqueries.

How to Use

  1. Paste an SQL query into the input field.
  2. Optionally select the SQL dialect and indentation settings.
  3. Click "Format" to pretty-print the query.
  4. Click "Copy Result" to copy to clipboard.

FAQ

Which SQL dialects are supported?

Standard SQL, MySQL, PostgreSQL, SQLite, T-SQL (SQL Server), PL/SQL, and MariaDB.

Can keywords be uppercased?

Yes. Set the "Keyword case" option to "Uppercase" to normalize SELECT, FROM, and other keywords.

Is my data sent to a server?

No. All processing happens in your browser.