YAML ↔ JSON

Convert YAML to JSON and back.

Your YAML and JSON are converted locally in your browser and nothing is uploaded to a server.

Need to tidy up the result? Try the JSON Formatter.

About YAML ↔ JSON

This yaml to json converter turns YAML into clean, formatted JSON and converts JSON back into YAML with a single direction toggle. Paste a config file, Kubernetes manifest, CI pipeline, or API response and switch instantly to convert yaml to json or json to yaml. The JSON output is syntax highlighted and pretty-printed, ready to copy or download as a .json or .yaml file. It is built for developers, DevOps engineers, and QA testers who hop between the two formats while editing configs or debugging payloads. Conversion uses a standard YAML parser, so anchors and typed scalars are resolved correctly. Everything runs locally in your browser, so your data never leaves your device.

Features

How to use the YAML ↔ JSON

  1. Pick a direction with the YAML to JSON or JSON to YAML toggle at the top.
  2. Paste or type your source into the input box on the left.
  3. Read the converted output as it appears live on the right.
  4. Click the copy button or download the result as a .json or .yaml file.
  5. Press Clear to reset the input and start a new conversion.

Example

Input

name: ArrayKit
offline: true
tags:
  - dev
  - tools

Output

{
  "name": "ArrayKit",
  "offline": true,
  "tags": [
    "dev",
    "tools"
  ]
}

YAML to JSON conversion of a small config block.

Common errors & troubleshooting

Frequently asked questions

What is a YAML to JSON converter?
It is a tool that parses YAML and re-serializes it as equivalent JSON. This converter also runs in reverse, turning JSON back into YAML, so you can move between the two formats in one place.
How do I convert JSON back to YAML with this tool?
Set the direction toggle to JSON to YAML, then paste your JSON into the input box. The YAML output updates live and can be copied or downloaded as a .yaml file.
Does this yaml to json converter support multi-document YAML?
It converts a single document. If your input contains several documents separated by ---, only the first one is used in the output.
Are YAML comments preserved in the JSON output?
No. YAML comments are dropped during conversion because JSON does not support comments. Keep the original YAML if you need them.
What indentation does the JSON output use?
JSON is pretty-printed with two-space indentation so it stays readable and diff-friendly in version control.
Is my YAML or JSON data uploaded anywhere when I use this converter?
No. The conversion runs entirely in your browser, so your YAML and JSON never leave your device and nothing is uploaded to a server.

Related tools

All ArrayKit tools