Skip to main content

SQL Formatter

Format, beautify, and minify SQL queries with syntax highlighting and dialect support

Dialect
Indent
Input SQL
Formatted Output

Paste SQL in the input pane and click Format

Frequently Asked Questions

Is my SQL query sent to any server for formatting?

No. The SQL formatter is a 100% client-side tool. Your query text is tokenized and reformatted entirely in your browser without any network requests. This makes it safe to format proprietary or sensitive database queries.

Which SQL dialects are supported?

The formatter supports MySQL, PostgreSQL, SQLite, SQL Server (T-SQL), and Oracle SQL. Dialect selection controls identifier quoting (backtick vs double quote), specific keyword handling, and function name casing differences between database engines.

Can I minify SQL as well as format it?

Yes. Toggle the Minify switch to compress your query into a single-line form with minimal whitespace — useful for embedding SQL in application code, reducing payload size, or generating compact queries for comparison and diffing.