Useful Tools Online

SQL Formatter & Beautifier

Format, indent, and beautify standard SQL queries with uppercase keywords and custom indentation. 100% private.
Methodology & standardsRuns on your device

Inputs

Results update live
Indent:
Beautified SQL
SELECT u.id, u.name, u.email, count(o.id) AS total_orders, sum(o.amount) AS total_spent
FROM users u
  LEFT
JOIN orders o ON u.id = o.user_id
WHERE u.active = 1 AND o.status = 'completed'
GROUP BY u.id, u.name, u.email
HAVING sum(o.amount) > 500
ORDER BY total_spent DESC
LIMIT 50;

FAQ

Frequently asked questions

How the calculation works and where its limits are.

What does the SQL Formatter do?

The SQL Formatter takes unformatted or minified SQL queries and formats them with consistent indentation, line breaks before major clauses (SELECT, FROM, WHERE, JOIN), and uppercase keywords.

Which SQL dialects are supported?

It supports standard SQL including PostgreSQL, MySQL, SQLite, Microsoft SQL Server (T-SQL), Oracle, MariaDB, and Snowflake.

Is my SQL query transmitted to any server?

No. All SQL parsing and formatting run 100% locally in your browser. Sensitive table names and database structures are never sent over the network.