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.

Runs in your browser v1.0.0

Options

live

SQL input

paste or type

One statement or many. Strings ('it''s'), quoted identifiers and /*! ... */ or /*+ ... */ hints are preserved exactly.

Minified SQL

live


                

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.