1. Paste your SQL
Paste a query from a database console, application log, dashboard, migration, report, or codebase.
Paste SQL from logs, dashboards, database consoles, or application code. Format or compact queries while preserving string literals, quoted identifiers, comments, and common dialect syntax.
Runs in your browser. Local files are read in your browser and are not uploaded by this tool.
Ready. Paste SQL to format.
Format SQL without relying on global whitespace replacement that can alter quoted text.
Paste a query from a database console, application log, dashboard, migration, report, or codebase.
Choose a SQL dialect, indentation style, and keyword case before formatting. Use Compact when you need a shorter one-line-oriented representation.
Review the formatted query, then copy it, download it as SQL, or move the result back into the input for another pass.
The formatter separates SQL code from protected text before changing layout.
Quoted string contents keep their internal spaces and escaped quote sequences instead of being rewritten by whitespace cleanup.
Double-quoted names, backtick identifiers, and SQL Server bracket identifiers are kept intact while surrounding SQL is reformatted.
Line and block comments are preserved. MySQL hash comments are recognized when MySQL mode is selected.
Formatting makes a query easier to inspect, but it is not the same as executing or validating it against a database engine.
Dialect selection changes token handling for common syntax patterns, but the tool does not connect to PostgreSQL, MySQL, SQL Server, SQLite, BigQuery, Snowflake, or another database.
A query can look well formatted and still contain a syntax, schema, permission, or logic error. Test production-impacting SQL in the database environment that will execute it.
Processing runs locally in the browser for normal use, but credentials, secrets, and sensitive production data should still stay out of online utilities.
The formatter tokenizes SQL before changing layout, so spaces and text inside quoted string literals are preserved instead of being globally collapsed.
The workspace includes Standard SQL, PostgreSQL, MySQL, SQL Server, SQLite, BigQuery, and Snowflake modes for dialect-aware token handling and review.
Yes. Choose 2 spaces, 4 spaces, or tabs for indentation, and uppercase, lowercase, or preserved SQL keyword casing.
No. This V1 focuses on safe formatting and compaction rather than database-specific execution validation. Always test important queries in the target database.
For normal use, formatting runs in your browser. Avoid pasting credentials, secrets, or sensitive production data into any online utility.