SQL Formatter

Tool guide

Format SQL for the target dialect

Format queries for MySQL, PostgreSQL, SQLite, T-SQL and other dialects without connecting to a database or executing SQL.

How to use

  1. Paste redacted SQL.
  2. Choose the matching dialect and select Format.
  3. Review quotes, placeholders and comments before copying.

Example and expected result

Input: select id from users where active = 1;
Choose the target dialect to view SELECT, FROM and WHERE on separate lines.

Capabilities and limits

  • This page provides formatting, without a separate SQL minifier.
  • Successful formatting does not prove executability or improve query performance.

Troubleshooting

Check the dialect and template placeholders when syntax is rejected. Keep the original query for comparison.

Data processing and storage

SQL input is stored in localStorage and may return after reloading. Use Clear or clear this site’s browser data. Do not paste live credentials.

Read the full data-processing notice