Mello
{} Developer

SQL Formatter

Make tangled SQL readable — supports common dialects.

Runs in your browserNo account requiredNo uploadFree
Loading tool…

About SQL Formatter

SQL Formatter turns a tangled query into a readable one. It puts the major clauses — SELECT, FROM, JOIN, WHERE, GROUP BY, ORDER BY — on their own lines, indents nested subqueries, breaks up long column lists, and applies consistent keyword casing, so a query pasted as one long line becomes something you can actually review.

Paste a query and choose your dialect. A statement like select id,name from users u join orders o on o.uid=u.id where o.total>100 is expanded into a clause-per-line layout with the join condition and the filter clearly separated. Formatting is purely cosmetic — the query logic, the table and column names, and any literal values are never changed.

Dialect choice matters because each database has its own keywords and quoting rules: standard SQL, MySQL, PostgreSQL, SQLite, BigQuery, Snowflake, T-SQL, and Redshift are supported, and picking the right one keeps dialect-specific syntax intact. The tool formats text only — it does not connect to a database, execute the query, or check that the referenced tables and columns exist.

Formatting runs entirely in your browser. Queries often embed table names, business logic, and sometimes literal values drawn from production data; none of that is uploaded or stored here.

Frequently asked questions

Standard SQL, MySQL, PostgreSQL, SQLite, BigQuery, Snowflake, T-SQL (Microsoft SQL Server), and Redshift.

More developer tools

JSON Formatter & Validator
Paste JSON to format, validate, or minify — runs entirely in your browser.
{}Developer
Base64 Encoder / Decoder
Encode to Base64 or decode it back — handles UTF-8 correctly.
{}Developer
JSON ↔ CSV Converter
Convert between JSON and CSV — round-trip safe, runs locally.
{}Developer
Regex Tester
Build and test JavaScript regular expressions with live highlighting.
{}Developer
UUID / GUID Generator
Generate cryptographically random UUID v4 identifiers.
{}Developer
Number Base Converter
Convert a number between binary, octal, decimal, hex, and any base 2–36.
{}Developer