SQL Formatter
Format SQL queries for any database.
How to use
- 1Paste your SQL query or queries.
- 2Pick your database dialect.
- 3Choose keyword case and indentation.
- 4Copy the formatted SQL.
Frequently asked questions
Which databases are supported?
Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, SQL Server, Oracle PL/SQL, BigQuery and Snowflake.
Does formatting change what my query does?
No. Only spaces, line breaks and keyword case change. The query logic stays the same.
Can I format several queries at once?
Yes. Separate them with semicolons and each is formatted with a blank line between them.
Is my SQL sent to a server?
No. Formatting happens in your browser, so table names and data stay private.
You may also need
YAML ⇄ JSON Converter
Convert YAML to JSON and back.
JSON to TypeScript
Generate TypeScript interfaces from JSON.
HTML Entity Encoder
Escape and unescape HTML entities.
Number Base Converter
Binary, octal, decimal, hex and any base.
Cron Expression Explainer
Cron schedules in plain English with next runs.
IP Subnet Calculator
Network, mask, broadcast and host range.