SQL Minifier
Strip comments and collapse whitespace to compress a query onto one line.
About this tool
Strips comments and collapses extra whitespace from a SQL query down to a single compact line — useful for pasting a query somewhere with a length limit, or embedding it in a config file where line breaks are awkward. It removes --, # and /* */ comments and drops every space that isn't needed, keeping one only where two words would otherwise run together.
It reads the SQL properly rather than just searching the text, so anything inside quotes is left exactly as it was: '--' or '#1' in a string isn't treated as a comment, and double spaces inside text values are kept. SQL Server temporary tables such as #orders aren't mistaken for comments, and optimiser hints (/*+ INDEX(t i) */) and MySQL version comments (/*! … */) are kept, because removing them would change how the query runs.