SQL Formatter

Formatted locally

Beautify SQL online: auto-indent SELECT/FROM/WHERE clauses, normalize keyword case, minify to one line — multiple dialects supported.

SQL statement
Formatted output

Enter SQL and click Format.

    What is Sql Formatter

    Turn a wall of SQL into readable, indented output: SELECT/FROM/WHERE clauses on their own lines, aligned AND/OR conditions, UPPER/lower keyword casing, a one-line minify mode and five dialect presets.

    How to use Sql Formatter

    1. Paste your SQL into the input box
    2. Pick a dialect, keyword case and indent width
    3. Click Format — or tick "Minify to one line" for compact output

    Frequently asked questions

    Which SQL dialects are supported?

    Standard SQL, MySQL, PostgreSQL, SQLite and T-SQL. Core keywords are shared across dialects; a few dialect-specific functions are preserved as plain identifiers.

    Does formatting change what the query does?

    No. Formatting only adjusts whitespace and keyword case — identifiers and clauses are untouched and string literals are preserved verbatim, so semantics stay identical.

    What is minify for?

    It collapses multi-line SQL into a single line — handy for config files, logs or command-line arguments — by merging all runs of whitespace into single spaces.

    Is Sql Formatter free?

    Sql Formatter is completely free — open the page and use every feature with no hidden charges.

    Do I need to download or install Sql Formatter?

    No download or installation is needed. It is an online tool that runs in the browser on your phone, tablet and computer.

    Do I need an account to use Sql Formatter?

    No. Use the tool right away — no account or sign-in required.

    Does Sql Formatter work on mobile?

    Yes. The page is fully responsive and works on phones, tablets and desktop browsers.