Skip to content

SQL Formatter

Beautify SQL queries with dialect-aware formatting for MySQL, PostgreSQL, SQL Server, Oracle, SQLite and more.

Runs in your browserSQL → SQL
Loading tool…

Example

Input
select id, name from users where active = 1 order by name
Output
SELECT
  id,
  name
FROM
  users
WHERE
  active = 1
ORDER BY
  name

How to use the SQL Formatter

  1. Paste or type your SQL into the input area, or open a file from your device.
  2. Adjust the options above the editor if the tool offers any.
  3. Review the SQL result, then copy it or download it as a file.

Privacy and limitations

  • Your data is processed on your device and is not uploaded to any server.

Frequently asked questions

Why should I pick a dialect?

Dialects differ in quoting, operators and keywords (for example backticks in MySQL, :: casts in PostgreSQL, [brackets] in SQL Server). Choosing the right one avoids parse errors and keeps those constructs intact.

Browse all sql converters →