Paste your SQL
Paste a query or a whole script, or open a .sql file. Pick the dialect your database speaks.
Paste a query or open a .sql file and get it neatly indented, with colored keywords, strings and comments.
Choose the dialect, keyword case, indent and comma style, or squeeze it into one line.
Formatted SQL appears here.Paste a query or a whole script, or open a .sql file. Pick the dialect your database speaks.
Keyword case, indent, comma position and where AND/OR go. The result updates as you change them.
Copy the formatted SQL or save it as a .sql file. Switch to minify for a one-line version.
Generate images, video and 3D models from your own code with WaveSpeed AI.
Create images from a prompt, or edit the ones you have.
Turn a still image or a prompt into a short video clip.
Turn a picture into a 3D model.
$1 in free credits for eligible new accounts. No card needed. Generators have separate account and credit requirements. The SQL formatter is free.
Standard SQL, PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), Oracle PL/SQL, BigQuery, Snowflake, Redshift, Spark, Hive, Trino/Presto, DuckDB, ClickHouse, Db2, Db2 for i, N1QL, SingleStore and TiDB. Picking the right one matters for quoting, comments and special operators.
No. Formatting happens in your browser, so queries with table names, customer data or credentials never leave your device.
The formatter tries the whole script first. If it can’t read it, it formats each statement on its own and leaves the ones with mistakes as you wrote them, telling you the line, so one typo doesn’t block the rest.
No. Only whitespace, line breaks and, if you choose, the case of keywords, functions and data types change. Strings, quoted names and comments are kept exactly.
It puts the SQL on one line, removes comments (or keeps them as /* */ if you ask) and drops spaces that aren’t needed, leaving strings untouched.
Yes. Choose leading commas and each list item after the first starts with a comma, which makes diffs and commenting out columns easier.
Mostly. Blocks with BEGIN … END are formatted, but the formatter is built for queries and DDL; long procedural code may come out less tidy than plain queries.
Free, private and without limits.