SQL Formatter
Beautify and minify SQLRuns locally · nothing uploaded
Input
Output
Also works as:sql beautifiersql minifierformat sql query
How to use
- 1Paste SQL.
- 2Choose dialect, indent and keyword case.
- 3Copy the formatted or minified SQL.
FAQ
Does minifying touch strings?
No. Quoted strings and identifiers are kept exactly; only whitespace and comments are removed.
Is my SQL executed?
No. It is only reformatted as text; no database is involved.
Related tools
JSON FormatterValidate, beautify, minify JSONSQL Create Table GeneratorBuild CREATE TABLE visuallyString Escape / UnescapeJSON, JS, regex, SQL, CSV escapingJSON to CSV ConverterConvert JSON and CSV both waysBase64 Encode / DecodeEncode and decode Base64URL Encode / DecodePercent-encode and decode URLs