SQL minifier
Collapse SQL onto a single line, removing comments and spare spaces.
Missing a feature or found a bug in SQL minifier? Tell me on X (@_andrewtran) or by email.
How to use SQL minifier
- Paste your SQL in the input pane.
- Read the one-line result in the output pane.
- Copy it or download it as a file.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
Is text inside quotes changed?
No. Strings and quoted names are kept exactly as written, including any spaces or dashes inside them.
Where are the other options?
This page opens SQL formatter with one choice already made. Every option of that tool is still here, and its own page says more about it.
Related tools
SQL formatter
Format SQL with clean indentation for PostgreSQL, MySQL, SQLite and SQL Server, or minify it to one line.HTML formatter
Beautify HTML with consistent indentation, or minify it by removing comments and spare whitespace.CSS formatter
Beautify CSS rules and media queries, or minify CSS with strings and comments handled safely.JSON viewer
Explore JSON as a collapsible tree, with counts for every object and list.