YAML to JSON in VS Code — Built-In Options vs Free Browser Tool
- VS Code has no built-in YAML-to-JSON conversion — you need an extension or external tool.
- The YAML extension by Red Hat adds schema support and validation but not conversion.
- Free browser tool works alongside VS Code — paste YAML, copy JSON back.
- For IntelliJ users: same situation — use the browser tool or a plugin.
Table of Contents
VS Code does not have a built-in "Convert YAML to JSON" command out of the box. You either install an extension from the marketplace or use an external browser tool alongside your editor. The browser converter is actually faster for most one-off conversions — no extension installation, no marketplace search, just open a browser tab and paste.
This guide covers both approaches so you can decide based on your workflow: VS Code extension options for those who want everything in one place, and the browser tool method for those who want zero setup.
Does VS Code Have Built-In YAML to JSON Conversion?
No. VS Code treats YAML as a text format with syntax highlighting and IntelliSense (via extensions), but the core editor does not include a YAML-to-JSON conversion command in the default Command Palette.
What VS Code does include by default:
- YAML syntax highlighting (basic, in the default install)
- JSON formatting via the built-in JSON language server
- Format Document command for JSON (Shift+Alt+F)
What requires an extension:
- YAML schema validation
- YAML formatting (auto-indent, sort keys)
- YAML to JSON conversion via Command Palette
The most-installed YAML extension is "YAML" by Red Hat (30M+ installs). It adds schema validation, hover documentation, and formatting — but not YAML-to-JSON conversion. For conversion, you need a different extension or an external tool.
VS Code Extensions That Add YAML to JSON Conversion
Several VS Code marketplace extensions add YAML-to-JSON conversion as a Command Palette command:
vscode-yaml (by Pascal Nitsche): Adds "YAML: Convert to JSON" to the Command Palette. Select the YAML text in the editor, run the command, and it replaces the selection with JSON.
Convert YAML and JSON: A minimal extension specifically for bidirectional conversion. Select YAML text, right-click or use Command Palette to convert to JSON.
How to use any of these:
- Open the Extensions panel (Ctrl+Shift+X)
- Search for "yaml to json"
- Install an extension with good ratings and recent updates
- Select your YAML text in the editor
- Open Command Palette (Ctrl+Shift+P), type "YAML to JSON"
- The JSON replaces your selection in the editor
Extension-based conversion is convenient if you are already editing the YAML file in VS Code. The downside: each extension adds a small startup cost and marketplace extensions vary in quality and maintenance.
Sell Custom Apparel — We Handle Printing & Free ShippingUsing the Browser Tool Alongside VS Code — No Extension Needed
The most popular workflow among developers who do not want to install marketplace extensions:
- In VS Code, select all the YAML content (Ctrl+A when the YAML file is open)
- Copy (Ctrl+C)
- Switch to your browser with the YAML to JSON converter open
- Paste into the input area, click Convert
- Copy the JSON output (Ctrl+C)
- Switch back to VS Code, open a new .json file, paste
This is faster than installing and learning an extension for occasional conversions. The browser tool also shows an error message with the line number if your YAML has a syntax problem — useful for debugging before using the config in production.
Keep the converter open in a pinned browser tab if you convert YAML to JSON regularly. The tab stays loaded and conversion is instant.
YAML to JSON in IntelliJ IDEA and Other JetBrains IDEs
IntelliJ IDEA and other JetBrains IDEs (WebStorm, PyCharm, GoLand) have better built-in YAML support than VS Code. IntelliJ includes a "Convert YAML to JSON" option in some contexts and the Built-in JSON formatter handles the output.
However, the most reliable method in IntelliJ for a complete file conversion remains:
- Right-click the YAML file in the Project panel
- Look for "Convert" or use the Scratches/Actions search (Shift+Shift, type "YAML")
- If not available, use the same browser tool approach — copy YAML from the editor, convert in browser, paste JSON back
JetBrains IDE users who work heavily with Kubernetes or Ansible often use the Kubernetes plugin or Ansible plugin which include their own YAML tooling — including schema validation and some conversion capabilities.
Convert YAML to JSON Without Installing Extensions
Faster than a marketplace install for one-off conversions. Paste your YAML, get JSON instantly. Switch back to VS Code and paste.
Open Free YAML to JSON ConverterFrequently Asked Questions
How do I convert YAML to JSON in VS Code?
VS Code has no built-in YAML-to-JSON command. Install a marketplace extension like "Convert YAML and JSON" — then select YAML text and use the Command Palette (Ctrl+Shift+P) to run the conversion. Alternatively, copy your YAML from VS Code and paste into the free browser converter, then copy the JSON back.
Does the Red Hat YAML extension for VS Code convert YAML to JSON?
No. The Red Hat YAML extension adds schema validation, formatting, and IntelliSense. It does not add a YAML-to-JSON conversion command. For conversion, install a separate extension or use an external browser tool.
Can I convert YAML to JSON in VS Code without installing any extension?
Yes. Copy your YAML from VS Code, open the browser YAML to JSON converter, paste, click Convert, copy the JSON output, and paste it back into VS Code as a .json file. No extension needed.
Does IntelliJ IDEA have built-in YAML to JSON conversion?
IntelliJ has some built-in YAML tooling that includes format conversion in certain contexts, but availability depends on the IDE version and installed plugins. The most reliable method is the browser converter — copy YAML from IntelliJ, convert, paste JSON back.

