Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Inline TransformNew to Visual Studio Code? Get it now.
Inline Transform

Inline Transform

Chenglong.Li

|
3 installs
| (1) | Free
Inline text transformation utilities: JSON formatting, string unescaping, and more
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Inline Transform

A VS Code extension for quickly transforming selected text in place with JSON and string utilities.

Features

This extension provides the following text processing features:

  • Unescape JSON String and Format: Parse and format escaped JSON strings (handles one level of escaping)
  • Unescape JSON String and Format Recursively: Parse and format deeply nested escaped JSON strings (handles multiple levels of escaping)
  • Unescape String: Unescape common escape sequences in strings (\n, \t, ", \, etc.)

Usage

  1. Select the text you want to process in the editor
  2. Open the Command Palette with Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS)
  3. Type and select one of the following commands:
    • Inline Transform: Unescape JSON String and Format - Parse and format escaped JSON (one level)
    • Inline Transform: Unescape JSON String and Format Recursively - Parse and format deeply nested escaped JSON
    • Inline Transform: Unescape String - Unescape escape sequences in text

The processed result will automatically replace the selected text.

Examples

Unescape JSON String and Format

Selected text: "{\"name\":\"John\",\"age\":30}"

After running Inline Transform: Unescape JSON String and Format:

{
  "name": "John",
  "age": 30
}

Unescape JSON String and Format Recursively

This command is useful when you have multiple levels of escaped JSON strings nested within each other.

Selected text:

{"data":"{\"user\":\"{\\\"name\\\":\\\"John\\\",\\\"age\\\":30}\"}"}

After running Inline Transform: Unescape JSON String and Format Recursively:

{
  "data": {
    "user": {
      "name": "John",
      "age": 30
    }
  }
}

The command recursively parses each nested JSON string until all levels are fully unescaped and formatted. In contrast, Inline Transform: Unescape JSON String and Format would only parse one level, leaving inner escaped strings unparsed.

Unescape String

Selected text: Hello\nWorld\tThis is a \"test\"

After running Inline Transform: Unescape String:

Hello
World	This is a "test"

Differences Between Commands

Unescape JSON String and Format vs Unescape String

Unescape JSON String and Format:

  • Input must be valid JSON
  • Parses JSON structure and handles escaped JSON strings
  • Output is formatted JSON with indentation
  • Example: "{\"name\":\"John\"}" → {\n "name": "John"\n}

Unescape String:

  • Input can be any text with escape sequences
  • Only unescapes common escape sequences (\n, \t, \", \\, etc.)
  • Output is plain text without formatting
  • Example: "{\"name\":\"John\"}" → {"name":"John"}

Key difference: Unescape JSON String performs JSON parsing + formatting, while Unescape String only unescapes characters without formatting.

Requirements

  • Visual Studio Code 1.107.0 or higher

Release Notes

0.0.1

Initial release with JSON and string unescaping utilities.


Enjoy!


This extension was developed with AI assistance.

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