Developer Tools

YAML to JSON Converter

Convert YAML to JSON instantly in your browser. Handles nested maps, lists, comments, quoted strings, booleans and null values.

Tool

About the YAML to JSON Converter

The YAML to JSON Converter runs entirely in your browser — your data never leaves your machine.

YAML is friendlier to write for config files, while JSON is what APIs and code consume. This converter reads the indentation-based YAML structure and emits equivalent JSON — the reverse of our JSON to YAML tool.

How to use this tool

  1. Paste your YAML document (with two-space indentation is fine).
  2. Choose compact or indented JSON output.
  3. Convert and copy.

Supported YAML features

  • Nested maps via indentation.
  • Block lists introduced with a dash (-).
  • Comments starting with #.
  • Quoted strings, numbers, booleans and null.
  • Inline flow collections like [a, b] and {x: 1}.

Developer tip

YAML is whitespace-sensitive: use spaces, never tabs, and keep indentation consistent. If the output looks wrong, check the indentation of the nested block first — it is almost always the cause.

Who is this tool for?

DevOps engineers moving Kubernetes, Docker Compose or CI config into JSON, and developers debugging config files.

Frequently asked questions

Yes. Lists introduced with a dash are converted, including lists of maps at deeper indentation levels.
Lines beginning with # are ignored and do not appear in the JSON output, since JSON has no comment syntax.
No. YAML does not permit tabs for indentation; use spaces. The tool assumes space-based indentation.

Related tools

Guides for this tool