- Paste SQL up to 1,000,000 UTF-16 units.
- Select indentation and keyword case.
- Choose Format or Minify.
- Review the result and test it in your target database before copying.
Format SQL source
The formatter uses a standard SQL parser to distinguish keywords, quoted values and comments. Choose two or four spaces or tabs, and upper, lower or preserved keyword case. The tool never executes queries or connects to a database.
Compact mode
Minify reduces whitespace between tokens while retaining string contents and comments. Line comments keep the newline they need. It does not promise the smallest possible query, and comments are not removed. Size counters use UTF-8 bytes.
Compatibility limits
The selected dialect is standard SQL. Vendor extensions, stored procedures or alternate statement delimiters may fail; an error is preferable to rewriting unknown syntax. The input limit is 1,000,000 UTF-16 units. Formatting is not query validation, optimization or a security review. The engine loads from this site; see the privacy policy for shared services.