Formats and indents SQL queries (multiple dialects).
SQL Formatter takes a raw, unformatted SQL query and rewrites it with consistent indentation and uppercased keywords so it's easier to read and review. It supports several dialects, including standard SQL, PostgreSQL, MySQL, SQLite, MariaDB, and BigQuery, making it handy for cleaning up queries copied from logs, ORMs, or one-liners. Use it to beautify and pretty-print queries before sharing them or committing to a repo.
No. The formatter runs entirely in your browser using JavaScript, and your query never leaves your device. Nothing is uploaded or stored on any server.
You can choose from standard SQL, PostgreSQL, MySQL, SQLite, MariaDB, and BigQuery. Pick the dialect that matches your database for the most accurate formatting.
Yes. SQL keywords such as SELECT, FROM, and WHERE are uppercased automatically. Table names, column names, and string values are left as you wrote them.
No. The tool only adjusts whitespace, indentation, and keyword casing for readability. It does not rewrite or optimize the query logic.
The formatter is lenient and will still attempt to lay out the query, but malformed SQL may produce unexpected indentation. For best results, format syntactically valid queries.