SQL Formatter & Minifier
Format or safely minify SQL in eight dialects without touching string literals
Paste SQL or load a sample.
SQL stays in your browser; never executed or uploaded. Formatting checks lexical structure; it does not certify database syntax.
How to Use
- 1.Choose dialect and operation, paste SQL, set options and Run.
- 2.Copy or download .sql.
- 3.Swap exchanges both buffers; Undo restores Sample or Reset replacements.
SQL Formatter & Minifier
Format or safely minify SQL in eight dialects, locally in your browser.
Limits and Privacy
Input and options may be saved in browser storage; clear site data to remove them. Literals and required newlines are retained. Formatting does not validate all database syntax. Length uses UTF-16 units.
Frequently asked questions
- Which SQL dialects are supported?
- Standard SQL, PostgreSQL, MySQL, SQLite, BigQuery, SQL Server (T-SQL), Snowflake and Oracle (PL/SQL). The dialect controls quoting, comment and formatting rules.
- Does minification change my string literals?
- No. Minification is token-aware: string literals, quoted identifiers and retained comments are read as whole tokens, so whitespace inside them is never removed or collapsed.
- Can I keep or remove comments?
- Yes. Preserve Comments is on by default. When it is off, ordinary comments are removed, while optimizer hints and executable comments are kept to preserve behavior.
- Is my SQL uploaded or executed?
- No. SQL is formatted and minified in your browser and is never executed or uploaded. Input and options may be saved in browser storage on this device.
