Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>SQLineNew to Visual Studio Code? Get it now.
SQLine

SQLine

yuiko

| (0) | Free
Compress multi-line SQL into one-line text for HTTP request body
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SQLine

Typescript version Vscode version Version

  English   |   简体中文  

Introduction

Compress multi-line SQL into a single-line string, ready to paste into an HTTP request body, a JSON field, a YAML config, or anywhere a newline would break things.

The compressed result is copied to your clipboard — the SQL in your editor is left untouched.

Usage

  1. Select the SQL text you want to compress.
  2. Trigger the command in either way:
    • Command Palette → SQLine: Compress SQL to One Line
    • Right-click the selection → SQLine: Compress SQL to One Line
    • Shortcut → Ctrl + Shift + L
  3. A notification shows the character count before and after, plus a preview. Paste anywhere with Ctrl + V.

Note on the shortcut: Ctrl + Shift + L is bound to Select All Occurrences in the default VS Code keymap. If you rely on that, rebind SQLine via Preferences: Open Keyboard Shortcuts and search for sqline.compressSql.

What gets compressed

Rule Before After
CRLF normalized to LF SELECT 1\r\n SELECT 1
Newlines and tabs become spaces SELECT *\n\tFROM t SELECT * FROM t
Consecutive spaces collapse into one SELECT * SELECT *
Leading and trailing whitespace trimmed SELECT 1 SELECT 1

Example:

SELECT
    user_id,
    COUNT(*) AS cnt
FROM
    events
WHERE
    dt = '2026-07-30'
GROUP BY
    user_id

becomes:

SELECT user_id, COUNT(*) AS cnt FROM events WHERE dt = '2026-07-30' GROUP BY user_id

Feature

  • [x] Compresses any selection — no SQL parsing, so dialect never matters
  • [x] Result goes to the clipboard, the original SQL stays formatted
  • [x] Works from the Command Palette, the context menu, or a keyboard shortcut

Release Note

[0.0.1] - 2026-07-30

Initial release.

Licence

This project is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft