Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Line SpoilerNew to Visual Studio Code? Get it now.
Line Spoiler

Line Spoiler

Gliders Development

|
7 installs
| (0) | Free
Hide selected secret text while streaming and reveal it only when you click to show it.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Line Spoiler

Hide secrets while streaming. Reveal them only when you're ready.

Line Spoiler is a VS Code extension built for live coding, demos, and screen sharing. Select any text — a token, password, API key, or connection string — and hide it with a single command. The rest of your file stays fully visible so your audience can follow along. When you're ready to show the secret, click the Reveal hidden selection CodeLens above it.

Line Spoiler in action


Features

  • Precise hiding — hide only the exact characters you select, not the whole line.
  • File structure stays intact — viewers can follow your code while secrets are masked.
  • CodeLens reveal — a clear Reveal hidden selection button appears above every hidden area.
  • Per-block or bulk reveal — reveal one hidden area at a time or all at once.
  • Persistent state — hidden selections survive closing and reopening VS Code.

Usage

  1. Open a file that contains secrets, such as .env, .env.local, or a config file.
  2. Select the exact secret value you want to hide.
  3. Right-click and choose Line Spoiler: Hide Selected Secret Area, or run it from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
  4. Share your screen — the hidden area is masked and the rest of the file is visible.
  5. Click Reveal hidden selection above a hidden area whenever you're ready to show it.

Commands

Command Description
Line Spoiler: Hide Selected Secret Area Masks the current selection
Line Spoiler: Reveal Hidden Selection At Cursor Reveals the hidden area under the cursor
Line Spoiler: Reveal All Hidden Selections Removes all masks in the active file

All commands are also available in the editor right-click context menu.


Known Limitations

  • Hidden selections are stored as character offsets. If the file changes heavily while VS Code is closed, a restored hidden area may shift.
  • Editing text that falls inside a hidden selection removes that selection to prevent incorrect masking.
  • Reveal is triggered through the CodeLens button above the hidden area, not by clicking on the masked text itself.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft