How to use it
- Choose YAML to JSON, JSON to YAML, or Validate and format YAML.
- Paste your YAML or JSON.
- Fix any error at the line shown.
- Copy the result or swap it back into the input.
What YAML is used for
YAML ("YAML Ain't Markup Language") is a human-friendly data format built on indentation. It is everywhere in DevOps and development:
- Docker Compose files (
compose.yaml), - Kubernetes manifests and Helm values,
- CI/CD pipelines: GitHub Actions workflows, GitLab CI, CircleCI,
- Ansible playbooks,
- OpenAPI (Swagger) specifications,
- front matter in Markdown files and static site generators.
JSON and YAML describe the same kinds of data: maps (objects), lists and scalar values. In fact, nearly every JSON document is also valid YAML. Converting between them is useful when one tool wants JSON and another wants YAML, or when you want to check exactly how a YAML file is interpreted.
Supported YAML features
| Feature | Example |
|---|---|
| Key-value pairs | name: my-app |
| Nested maps by indentation | company: then city: Austin |
| Lists | - pdf on separate lines |
| Inline lists and maps | [a, b], {x: 1, y: 2} |
| Quoted strings | "line\nbreak", 'single' |
| Multiline blocks | | keeps line breaks, > folds them into spaces |
| Comments | # ignored |
| Types | numbers, true/false, null or ~ |
Not supported: anchors and aliases (&, *), custom tags (!), and multiple documents separated by --- in one file. Comments are lost on conversion because JSON has no comments.
Finding YAML errors
Validate and format YAML parses the file and shows the line number and a description of the first problem, then outputs a cleanly re-indented version. Typical errors:
- Tabs used for indentation. YAML only allows spaces. Replace tabs with two spaces.
- Inconsistent indentation between sibling keys, which makes YAML think a key belongs to a different parent.
- A missing space after the colon:
key:valueis a plain string, not a pair. - Duplicate keys in the same map, which the tool reports instead of silently keeping the last one.
- Unclosed quotes or brackets in inline values.
YAML gotchas
YAML guesses types for unquoted values, which sometimes surprises people:
version: 1.10becomes the number 1.1. Quote it:version: "1.10".zip: 02134may lose its leading zero or be read as an octal number by some parsers. Quote ZIP codes and IDs.- In older YAML 1.1 parsers,
yes,no,onandoffbecome booleans, so the country codeNOfor Norway turned intofalse. YAML 1.2 fixed this, but quoting such values is the safe habit. time: 12:30can be read as a base-60 number by YAML 1.1 parsers.
Converting to JSON here is a quick way to see exactly what type each value ends up as.
Privacy and related tools
Configuration files often contain hostnames, internal URLs and sometimes secrets. Everything here is parsed and converted in your browser, and nothing is uploaded. Still, it is good practice to keep real secrets out of YAML files and use environment variables or a secret manager instead.
Related tools: format and validate JSON with the JSON formatter, or turn JSON into a spreadsheet with JSON to CSV.
Frequently asked questions
How do I convert YAML to JSON?
Paste the YAML with YAML to JSON selected. The JSON appears instantly with 2-space indentation.
Why does my YAML give an error?
The message shows the line number. The most common causes are tabs instead of spaces, uneven indentation and a missing space after a colon.
Are YAML anchors supported?
No. Anchors and aliases (& and *), tags (!) and multi-document files are not supported.
Are comments kept when converting?
No. JSON has no comments, so they are dropped. Formatting YAML also removes them.
Is my config uploaded?
No. Parsing and conversion happen in your browser.
Last updated: November 12, 2026