SQL Formatter & Beautifier
Format SQL queries with uppercase keywords and clear indentation for SELECT, JOIN, WHERE and subqueries.
Result
How to use
- 1
Paste one or more SQL statements.
- 2
Choose keyword case and indent size.
- 3
Copy the formatted query back into your editor.
Questions
Which SQL dialects are supported?
The formatter works with standard SQL used by MySQL, PostgreSQL, SQL Server, Oracle, SQLite and BigQuery. It only changes whitespace and keyword case — your table names, strings and comments are left exactly as written.
Does it check whether my SQL is valid?
No — it formats the query but does not run or validate it against a database. Unbalanced quotes or brackets will show up as odd indentation.
Why uppercase keywords?
Writing SELECT, FROM and WHERE in capitals is a long-standing convention that makes the query structure easy to scan. SQL itself is not case-sensitive for keywords.
About this SQL Formatter tool
SQL Formatter & Beautifier — Format SQL queries with uppercase keywords and clear indentation for SELECT, JOIN, WHERE and subqueries. It is one of 200 free tools on namasivayam.in, made by software engineer Namasivayam Vadivelan for everyday use in India.
Everything is calculated instantly in your browser: nothing you type or upload is sent to any server, there is no sign-up, and it works on mobile and desktop. Paste one or more SQL statements.
Related reading
Articles that go with this tool

How AI Chatbots Actually Work — Explained Simply, Without the Jargon
AI chatbots can write emails, explain code and plan trips. But how do they really work, why do they sometimes confidently get things wrong, and how should you use them wisely?

Passkeys Explained: The Simple, Safer Way to Log In Without Passwords
Google, Apple and Microsoft now let you sign in with passkeys instead of passwords. What a passkey is, why it can’t be phished, and how to set one up in five minutes.

Public Wi-Fi Safety: 8 Rules Before You Connect at Airports, Cafés and Hotels
Free Wi-Fi is convenient, but it can expose your data to strangers on the same network. Eight simple rules to stay safe on airport, café, railway and hotel Wi-Fi.
Related tools
More developer tools you may like
Results are estimates to help you plan. They are not financial, tax or medical advice.