notadevblog
Esc

    SQL Formatter & Minifier

    Format SQL for PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, BigQuery and Snowflake, or minify it to one line. Comments, strings and placeholders stay.

    Mode

    At a glance

    Processing
    Locally in your browser, also offline once the page has been opened. Input never leaves your device.
    Dialects
    Standard SQL, PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, BigQuery, Snowflake
    Kept as written
    Comments, strings, dollar quoting, placeholders (?, $1, :name, @name) and MySQL DELIMITER blocks
    For agents
    WebMCP: sql_format · Module: /core/sql-formatter.js · Markdown · llms-full.txt

    How to Use

    1. 01 Paste your SQL Paste one or more statements, up to 2 MB. Choose the dialect your database speaks.
    2. 02 Choose the style Pick upper, lower or unchanged keywords and the indent width, or switch to minify for a single line.
    3. 03 Copy the result The result updates as you type. If the formatter cannot read something, it shows the line and column.

    About this tool

    Formatted SQL is easier to review: one clause per line, column lists indented, keywords in one case. The layout comes from the open-source library sql-formatter.

    Large files are formatted in a background thread, so the page stays responsive.

    Frequently Asked Questions

    More tools

    Cookie settings

    Here you can customize your cookie preferences.

    Necessary

    Essential for website functionality and security

    Preferences

    Remember your settings