Collapse SQL to a single line
Sometimes you need a query as one compact line — to embed it in code, paste it into a tool that expects a single statement, or store it without the formatting. Minifying strips the extra whitespace and line breaks while leaving the query's meaning unchanged. This tool turns a nicely formatted query back into a tight one-liner.
How to use it
- Paste your formatted SQL.
- Minify it to a single line.
- Copy the compact query.
When it helps
- Embedding a query in a string in your source code.
- Pasting into a field that expects one statement without line breaks.
- Storing a query compactly in a config value.
Questions people ask
Will it break string literals that contain spaces? Spacing inside quoted strings is preserved; only the structural whitespace around the query is collapsed.
Is my query uploaded? No — minifying runs in your browser.