Database & SQL
SQL Minifier
Paste a query to squeeze it onto one line — comments removed and redundant whitespace collapsed, while string literals, quoted identifiers and query meaning stay untouched. Everything runs in your browser.
Options
liveSQL input
paste or type
One statement or many. Strings ('it''s'), quoted identifiers and
/*! ... */ or /*+ ... */ hints are preserved exactly.
Minified SQL
liveCommon causes: an unterminated string or comment. The input is left untouched so you can fix it.
How it works
The query is tokenised in this tab. Comments and whitespace between tokens are dropped,
and a single space is re-inserted only where it is required so two tokens never merge
into a different one: back-to-back identifiers, adjacent string literals, or operator
pairs such as - - that would otherwise form a comment. String literals,
quoted identifiers and executable hints are copied through verbatim, so nothing is
rewritten or sent anywhere.