SQL Formatter & Beautifier

Clean up compact SQL from logs, migrations, BI tools and database clients locally in your browser.

Click to choose a .sql file or drop it here

You can also paste SQL directly into the editor.

0 bytes

0 bytes

Ready

Dialect-aware formatting

Use a formatter mode that matches SQL from MySQL, PostgreSQL, SQL Server, SQLite, BigQuery, Snowflake or Redshift.

No database connection

The tool only rewrites pasted text for readability. It does not validate tables, columns, permissions or runtime behavior.

Safe analytics

Usage events include only the selected dialect and broad input size bucket, never SQL text, identifiers, literals or filenames.

Related developer tools

Frequently Asked Questions

Is my SQL uploaded to Convertr?

No. SQL formatting runs in your browser with a bundled open-source formatter. Queries, table names and values are not sent to Convertr servers.

Which SQL dialects are supported?

The formatter supports standard SQL plus common dialects including MySQL, MariaDB, PostgreSQL, SQL Server T-SQL, SQLite, BigQuery, Snowflake and Redshift.

Does this execute SQL or connect to my database?

No. The tool only formats text. It does not execute SQL, connect to databases, inspect schemas or verify object names.

SQL Formatter

Format or compact supported SQL text using the selected dialect and indentation settings.

Input
SQL text, dialect, keyword case, and indentation choices.
Output
Formatted SQL text ready for review or copying.
Real limitations
Formatting does not connect to a database, validate schema names, optimize a query, or guarantee support for every vendor extension.
Privacy and data handling
SQL text, dialect, keyword case, and indentation choices is processed in this browser tab. Convertr does not receive or store it; closing or reloading the page clears the working state unless the tool explicitly offers a local download.

How to use this tool

  1. Provide SQL text, dialect, keyword case, and indentation choices in the tool controls.
  2. Choose the settings that affect formatted SQL text ready for review or copying, then run the tool.
  3. Review formatted SQL text ready for review or copying before copying or downloading it.

Common failure modes

Unterminated strings, comments, or unsupported dialect syntax can produce a parse error or imperfect formatting.

Useful example

Format a nested PostgreSQL SELECT with joins and a subquery into readable clauses and indentation.