YAML

Validate, format, and convert YAML to JSON locally in your browser.

Reset
Copy
{
  "name": "renderhub",
  "type": "ssg",
  "features": [
    "preview",
    "edit",
    "download"
  ],
  "ads": {
    "provider": "adsense",
    "enabled": true
  }
}

Tools

  • Format — re-emit parsed YAML with consistent indentation.
  • Download JSON — save the parsed structure as a .json file.
  • Toggle the preview between JSON and YAML on the right.

YAML in one paragraph

YAML (YAML Ain't Markup Language) is a human-friendly text format for configuration and small structured documents. Compared to JSON it adds comments, multi-line strings, anchors and aliases, and most importantly indentation-based nesting, which makes hand-edited config files easier to read. The trade-off is that YAML's grammar is much larger and more ambiguous than JSON's, so a tool that validates and reformats it pays for itself quickly.

Mistakes that bite everyone at least once

  • Tabs vs spaces. YAML forbids tab indentation. Editors that silently insert tabs produce errors that look like the YAML parser is broken.
  • The Norway problem. Unquoted NO, yes, off, on are parsed as booleans by YAML 1.1, which is what most libraries still use. Always quote country codes and string-like flags.
  • Implicit numbers. Leading zeros, version strings like 1.10, and large integers may be coerced to numbers and lose precision. Quote them.
  • Indentation drift. Two spaces, four spaces — pick one and stick with it. A document that mixes both parses, but the structure may not be what you intended.

YAML vs JSON

Use YAML when a human will edit the file frequently and a few extra characters of comments or formatting matter — CI pipelines, Kubernetes manifests, application config. Use JSON for anything that crosses a network or is generated by a machine. This tool converts YAML to JSON in a single click, which is the most reliable way to feed a YAML document to a system that only speaks JSON.