YAML ↔ JSON Converter

Paste YAML or JSON and switch formats for configs, manifests, and API payloads. Conversion stays in your browser.

YAML ↔ JSON Converter

Valid
Characters: 237 | Lines: 17
Converted JSON will appear here...

Seamless YAML ↔ JSON conversion!

Perfect for configuration files, CI/CD pipelines, and data processing workflows

YAML vs JSON in short

YAML is indentation-based and allows comments, which is why it shows up in Docker Compose, Kubernetes, and CI configs. JSON is stricter and ubiquitous in APIs and JavaScript tooling. Teams often edit in YAML and ship or validate as JSON—or the other way around.

  • YAML: readable nesting, comments, optional quotes
  • JSON: no comments, quoted keys, wide library support
  • Same data model for objects, arrays, strings, numbers, booleans, and null

Side-by-side example

YAML

# Config
server:
  host: localhost
  port: 8080
features:
  - auth
  - logging

JSON

{
  "server": {
    "host": "localhost",
    "port": 8080
  },
  "features": ["auth", "logging"]
}

Gotchas worth quoting

  • Booleans: bare NO, ON, yes may become true/false—quote them when they are country codes or labels.
  • Leading zeros: 01234 may become a number and lose the zero—use "01234".
  • Indentation: stick to spaces; mixing tabs breaks parsers.

Frequently asked questions

Does conversion preserve comments?

JSON has no comments, so YAML comments are dropped when you convert to JSON. Going JSON → YAML will not invent comments back.

Why did my value change type?

YAML can treat bare words like yes/no/on/off as booleans and strip leading zeros from numbers. Quote those values if you need strings.

Is my data uploaded?

No. Conversion runs in your browser. Nothing is sent to our servers for this tool.

Related tools

Related tools