Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Data Format ConverterNew to Visual Studio Code? Get it now.
Data Format Converter

Data Format Converter

Naman09Khater

|
3 installs
| (0) | Free
Convert between JSON, XML, and YAML formats directly in VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Data Format Converter for VS Code

Convert between JSON, XML, and YAML formats directly in VS Code with a single keyboard shortcut.

Version Installs

Features

  • 🔄 Quick Convert - Press Ctrl+Shift+C to convert between formats instantly
  • 🎯 Smart Detection - Automatically detects source format from content
  • ✂️ Selection Support - Convert selected text or entire document
  • 📋 Multiple Output Options - Replace in-place, open in new file, or copy to clipboard
  • 🖱️ Context Menu - Right-click to convert selected text

Supported Formats

  • JSON ↔ XML
  • JSON ↔ YAML
  • XML ↔ YAML

Usage

Method 1: Keyboard Shortcut (Recommended)

  1. Open a JSON, XML, or YAML file
  2. Press Ctrl+Shift+C (or Cmd+Shift+C on Mac)
  3. Confirm or select the source format
  4. Select the target format
  5. Choose output action (Replace, New File, or Copy)

Method 2: Command Palette

  1. Press Ctrl+Shift+P to open Command Palette
  2. Type "Data Format Converter" to see all available commands:
    • Data Format Converter: Convert - Interactive conversion
    • Data Format Converter: JSON → XML
    • Data Format Converter: JSON → YAML
    • Data Format Converter: XML → JSON
    • Data Format Converter: XML → YAML
    • Data Format Converter: YAML → JSON
    • Data Format Converter: YAML → XML

Method 3: Context Menu

  1. Select the text you want to convert
  2. Right-click to open context menu
  3. Click "Data Format Converter: Convert Selection"

Method 4: Convert Selection

  1. Select a portion of text in your editor
  2. Use any of the above methods
  3. Only the selected text will be converted

Examples

Convert JSON to YAML

Before (JSON):

{
  "database": {
    "host": "localhost",
    "port": 5432
  }
}

After (YAML):

database:
  host: localhost
  port: 5432

Convert XML to JSON

Before (XML):

<user id="123">
  <name>John Doe</name>
  <email>john@example.com</email>
</user>

After (JSON):

{
  "user": {
    "@id": "123",
    "name": "John Doe",
    "email": "john@example.com"
  }
}

Commands

Command Description Keybinding
Data Format Converter: Convert Interactive format conversion Ctrl+Shift+C
Data Format Converter: Convert Selection Convert selected text -
Data Format Converter: JSON → XML Convert JSON to XML -
Data Format Converter: JSON → YAML Convert JSON to YAML -
Data Format Converter: XML → JSON Convert XML to JSON -
Data Format Converter: XML → YAML Convert XML to YAML -
Data Format Converter: YAML → JSON Convert YAML to JSON -
Data Format Converter: YAML → XML Convert YAML to XML -

Output Options

After conversion, you can choose what to do with the result:

  • Replace - Replace the current content with converted output
  • New File - Open the converted content in a new editor tab
  • Copy to Clipboard - Copy the converted content to clipboard

Requirements

  • VS Code 1.85.0 or higher

Extension Settings

This extension currently has no configurable settings.

Known Issues

None at this time.

Release Notes

1.0.0

  • Initial release
  • Support for JSON, XML, and YAML conversions
  • Interactive and direct conversion commands
  • Context menu integration
  • Keyboard shortcut support

Author

Naman Khater

  • LinkedIn
  • npm
  • GitHub

Powered By

This extension is powered by @naman22khater/data-converter - a universal data format converter with central engine architecture.

License

MIT

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