Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Single-Line JSONNew to Visual Studio Code? Get it now.
Single-Line JSON

Single-Line JSON

Chirag Joshi

|
2 installs
| (0) | Free
Convert selected text into a single-line JSON-safe string with escaped quotes and line breaks.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Single-Line JSON

Convert any selected text into a single-line JSON-safe string with escaped quotes and line breaks.

Usage

  • Select text in the editor.
  • Press Command+Option+J (Mac) or Ctrl+Alt+J (Windows/Linux), or run from Command Palette: Convert Selection to Single-Line JSON.

Example

My Name is David.

I'm from France. I love "Python"

becomes

"My Name is David.\n\nI'm from France. I love \"Python\""

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