SQL Formatter
Loading...
Format and beautify SQL online (multi-dialect, with minify)
- 1
Paste your SQL
Drop in a query, DDL, or a one-liner copied from logs — or click the example button to see it in action.
- 2
Pick dialect and options
Choose the dialect for your database and set keyword case and indent width to match your team's style; results render in real time.
- 3
Copy or minify
Copy the formatted output into your client or code; click minify first when you need a single line.
Features Overview
Format SQL online: paste a query for instant beautified output across 20 dialects (standard SQL, MySQL, PostgreSQL, SQLite, ClickHouse, Snowflake, and more), with keyword case, indent width, and blank-line controls plus one-click minify — all in your browser.
Tool Description
Free online SQL formatter and beautifier with minify. 20 SQL dialects, three keyword-case modes, indent width and blank-line controls; line comments convert to block comments when minifying so nothing gets swallowed. All local.
Capabilities Checklist
- 20 SQL dialects: standard SQL, MySQL, PostgreSQL, SQLite, MariaDB, ClickHouse, DuckDB, Snowflake, TiDB, BigQuery, Oracle PL/SQL, Transact-SQL and more — pick the one matching your database.
- Format and minify both ways: beautified output makes JOINs and subqueries readable; minify folds the statement into one line for logs and dynamic assembly.
- Fine-grained options: keyword case (preserve/upper/lower), indent width (2/4/8 spaces), and a blank-line toggle between statements.
- Minify-safe comments: line comments are converted to block comments before folding, so nothing after a comment gets swallowed.
- Nothing leaves your browser: parsing and formatting run locally, with no length limit.
User feedback
Go to feedback
User feedback
Related Tools
JSON Formatter Online
Format, validate, and explore JSON in your browser with a tree view, exact error lines, and JSONPath, with nothing uploaded
JSON YAML Converter
JSON and YAML format conversion, supports syntax highlighting and history tracking
CSV to JSON Converter
Turn CSV into a JSON array online, with type inference and CJK-safe parsing
XML Validator
Validate XML online with DTD and XSD schema checks plus formatting tools