Beautify and format SQL queries instantly in your browser. Support for MySQL, PostgreSQL, SQL Server, Oracle, SQLite, MariaDB, and BigQuery, with custom keyword casing and indentation. No sign-up, nothing stored.
A SQL formatter takes a raw, unformatted, or minified SQL query and rewrites it with consistent indentation, line breaks, and keyword casing. The result is a readable, standardized query that is far easier to scan, review, and debug than a single dense line of text.
This tool formats SQL for eight popular dialects and lets you choose how keywords are cased and how clauses are indented. Everything runs client-side, so even sensitive production queries never leave your browser.
Messy, one-line, or minified SQL is reindented and aligned as you type — no button to press.
Format for Standard SQL, MySQL, PostgreSQL, MariaDB, SQLite, SQL Server, Oracle PL/SQL, or BigQuery.
Force keywords to UPPERCASE, lowercase, or preserve them exactly as you wrote them.
Choose 2 spaces, 4 spaces, or tabs to match your team's style guide and editor settings.
Copy the formatted query to your clipboard or download it as a ready-to-use .sql file.
Your queries are formatted entirely in your browser. Nothing is uploaded, logged, or stored.
Drop a query into the input panel on the left — minified, single-line, or already partly formatted.
Select the database you target so the formatter understands dialect-specific syntax and functions.
Choose UPPERCASE, lowercase, or preserve for keywords, and 2 spaces, 4 spaces, or tabs for indentation.
The formatted query updates live on the right — copy it or save it as a .sql file with one click.
Yes. The SQL Formatter is completely free with no sign-up, no limits, and no ads interrupting your work. Format as many queries as you like.
No. Formatting happens entirely in your browser using client-side JavaScript. Your queries never leave your device and nothing is stored or logged.
You can format Standard SQL, MySQL, PostgreSQL, MariaDB, SQLite, SQL Server (T-SQL), Oracle PL/SQL, and BigQuery. Pick the dialect that matches your database for the most accurate result.
Yes. Set keywords to UPPERCASE, lowercase, or preserve their original case, and choose between 2 spaces, 4 spaces, or tab indentation to match your style guide.
If the query cannot be parsed, the input is highlighted and an inline error message explains the problem. Fix the syntax and the formatted output updates instantly.
No. The formatter only adjusts whitespace, line breaks, indentation, and keyword casing. The logic and results of your query stay exactly the same.
Format, validate, and beautify JSON data with syntax highlighting.
View, edit, and convert Markdown with live preview and export.
Beautify or minify XML with custom indentation and basic validity checks.
Format and beautify HTML, CSS, and JavaScript with custom indentation.