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

YAML to JSON

ahebrank

|
79,055 installs
| (4) | Free
Convert YAML from clipboard or current document/selection to JSON and vice versa.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

YAML to JSON

Convert between YAML and JSON in the editor

marketplace installs

This extension makes two commands available:

  1. convert a selection / document in the open editor
  2. convert the content of the clipboard buffer.

These commands autodetect the input format, so if you have YAML in the clipboard, the convert clipboard command will output JSON.

Converting JSON to YAML

This extension is adapted from https://github.com/buianhthang/vscode-xml2json/

Extension settings

yamlExpansionDepth: with deeply nested structures, YAML expansion can produce a lot of whitespace indentation. To keep lines from going off the screen horizontally, you can set the maximum depth of the structure to expand before switching to a more compact inline format. The default value is 6.

yamlIndentationSpaces: introduced with version 0.0.9, this is the number of spaces to use when indenting YAML. The default value is 4, but when upgrading, this setting will initialize to the previous value, which was the workspace editor tabSize setting.

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