YAML to JSON

Convert YAML into JSON, including multi-document files and key sorting.

100% private — everything runs in your browser

How to Use

  1. 1

    Paste YAML — Kubernetes manifests and CI configs work well.

  2. 2

    Choose the indent and whether keys should be sorted.

  3. 3

    Convert, then copy or download the JSON.

Examples

Simple mapping

Input

name: app
ports:
  - 3000

Output

{
  "name": "app",
  "ports": [
    3000
  ]
}

Multi-document file

Input

a: 1
---
b: 2

Output

An array with two objects, one per document.

FAQ

Are multi-document YAML files supported?

Yes. Documents separated by --- become an array, one entry per document.

What happens to anchors and aliases?

They are resolved into plain values, so the JSON contains no YAML-specific syntax.

Why does my YAML fail?

Tabs are not allowed for indentation in YAML and a colon must be followed by a space. The error message points to the line.

Related Tools