YAML to JSON Converter
Convert YAML to JSON online – config files, Kubernetes and Docker Compose files, with clear error messages that show the exact line and column.
Converter
About this tool
About YAML to JSON Converter
Paste YAML and get clean, valid JSON instantly. The converter understands the full YAML 1.2 syntax – nested maps and lists, multi-line text (| and >), anchors and aliases, comments and several documents separated by ---. If the YAML has a mistake, you see the line, the column and a pointer to the problem, so wrong indentation is easy to fix.
How it works
Example
How to use this tool
- Paste your YAML (or press the sample).
- Choose the indent and how several documents are handled.
- Copy or download the JSON.
Frequently asked questions
Why does my YAML give an indentation error?
YAML uses spaces (never tabs) to show nesting, and items at the same level must line up exactly. The error message points to the first line that does not line up.
What happens with several documents?
A file with --- separators holds several documents. Tick “Several documents → one array” to get them all; otherwise only the first is converted.
Does the YAML to JSON Converter send my data to a server?
No. The YAML to JSON Converter runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.