Calculator Need
Categories

SQL Formatter

Format SQL with uppercase keywords and indentation.

Formatted SQL appears here.

Runs entirely in your browser. Nothing you paste or upload leaves your device.

How to use the SQL formatter

  1. Paste SQL into the box, or press “Sample”.
  2. Choose the dialect if one is listed.
  3. Press “Format”, then copy or download the formatted SQL.

SQL formatter example

select id,name from users where active=1 and city='Lahore' order by name becomes uppercase keywords on separate lines (SELECT, FROM, WHERE, AND, ORDER BY) with consistent indentation, which makes long queries readable in code reviews.

Tips for using the SQL formatter

  • Formatting does not change what the query does.
  • Check quoted strings after formatting if your database uses unusual quoting.
  • Keep one style across a team so diffs show real changes only.

SQL formatter: common questions

What does formatting change?
Only the layout: keywords in uppercase and consistent indentation. The query itself — tables, columns and logic — stays the same.
Will the formatted SQL still run?
Yes. Formatting does not change what the query does, but check the result before running it on a live database.
Is my SQL uploaded?
No. Formatting runs in your browser.
Which databases does it support?
Standard SQL used by MySQL, PostgreSQL, SQL Server, SQLite and Oracle; vendor-specific syntax is kept as written.