SQL Minifier

SQL Tools

Collapse SQL to one line and strip comments and extra whitespace.

Runs entirely in your browser โ€” nothing is uploaded

Features

  • Collapses any query to a single line.
  • Removes -- and /* */ comments safely.
  • Preserves whitespace inside string literals.
  • Reports the byte saving.

How to use the SQL Minifier

  1. 1Paste the formatted SQL.
  2. 2Choose whether to strip comments.
  3. 3Copy the single-line result.

Frequently asked questions

Is minified SQL faster?

Not measurably โ€” the planner ignores whitespace. It is useful for embedding queries in config files, logs or JSON.