Need AI Training/Help?CloudYeti.io/meet
MarkdownMe

SQL Formatter

Paste messy SQL and get properly indented, aligned output. Supports five dialects (PostgreSQL, MySQL, SQL Server, BigQuery, SQLite), configurable indentation, and keyword case (UPPER, lower, preserve). Runs entirely in your browser using the sql-formatter library — safe for internal queries with sensitive column names.

0 / 100,000
Next useful step

Test your AI fundamentals next

If this tool is part of your AI or developer workflow, the free CloudYeti diagnostic shows which AWS AI concepts you already know and where you are weak.

Take the AI diagnostic

Frequently Asked Questions

Which SQL dialect should I pick?
Match your actual database. PostgreSQL covers Postgres, Redshift, CockroachDB. MySQL covers MySQL, MariaDB, TiDB. SQL Server is T-SQL (SQL Server, Azure SQL). BigQuery has its own dialect. SQLite for embedded and mobile. Picking the wrong dialect usually still formats correctly but can misformat dialect-specific syntax like PostgreSQL arrays or BigQuery STRUCT literals.
Does it rewrite my query or change its logic?
No. Pure whitespace and case changes. The formatter preserves every token, comment, and literal exactly as written — it just reflows the query so it's readable.
Why did my query fail to format?
Either a syntax error in the source SQL (unbalanced parens, unterminated strings) or a dialect-specific construct the parser doesn't recognize. Try switching the dialect dropdown or fixing the source syntax.
Is my SQL uploaded anywhere?
No. Formatting runs in your browser. You can safely paste queries containing production table names, column names, or hardcoded values.

About SQL Formatter

Pretty-print SQL for PostgreSQL, MySQL, SQL Server, BigQuery, and SQLite. Fast, browser-based, no data leaves your machine. This tool runs entirely in your browser, so your content is not sent to a server. MarkdownMe provides free, fast, and reliable Markdown tools for developers, writers, and anyone who works with Markdown.