YAML to JSON Converter

Convert YAML to JSON online. Paste YAML from a config file and get valid, formatted JSON, with syntax errors explained.

YAML input

1

Result

Waiting for input

About this tool

YAML is common in configuration files and CI pipelines, but many APIs and tools only accept JSON. This converter parses YAML and outputs equivalent JSON, expanding anchors and aliases.

YAML to JSON example

The converter parses the YAML structure and outputs the equivalent JSON. Anchors and aliases are expanded into plain values.

name: app
ports:
  - 80
  - 443

{ "name": "app", "ports": [80, 443] }

Common YAML mistakes

YAML must be indented with spaces, never tabs, and each level must be indented consistently. A colon followed by a space inside an unquoted value starts a new key, so wrap such values in quotes. If the converter reports an error, check the line it names first.

Comments are dropped because JSON has no comment syntax, and only a single YAML document is converted at a time.

How to use it

  1. Paste YAML.
  2. Pick an indentation style.
  3. Copy the JSON or download it.

Frequently asked questions

Does it support anchors and aliases?

Yes. They are resolved into plain values in the JSON output.

What about YAML comments?

Comments are dropped because JSON has no comment syntax.

Does it handle multiple documents?

Only a single YAML document is converted.

More JSON tools

JSON Checker – Validate JSON OnlinePaste your JSON into this free JSON checker to validate it instantly. Any error is pinpointed by line and column, so you can fix it in seconds.Online JSON Editor with Find and ReplaceEdit JSON online with live validation, find and replace (including regex), key sorting and undo. Everything runs in your browser.JSON Formatter and BeautifierFormat and pretty print JSON online. Turn minified or messy JSON into readable, indented, syntax-highlighted text with 2 spaces, 4 spaces or tabs.JSON Minifier – Compress JSON OnlineMinify JSON online by removing every unnecessary space and line break. See the size before and after, then copy or download the result.JSON to CSV ConverterConvert JSON to CSV online. Paste an array of JSON objects and get a CSV ready for Excel, Google Sheets or a database, with nested objects flattened into columns.CSV to JSON ConverterConvert CSV to JSON online. The first row becomes the keys, and each following row becomes a JSON object. Dotted headers are rebuilt into nested objects.JSON to YAML ConverterConvert JSON to YAML online for Kubernetes manifests, Docker Compose files, CI pipelines and other configuration. Paste valid JSON and copy the YAML.JSON Diff Checker – Compare JSON OnlineCompare two JSON documents online and see exactly what was added, removed or changed, listed by path. Click any difference to jump to it.JSON Tree Viewer – Explore JSON VisuallyView JSON as a collapsible tree online. Expand only the branches you need instead of scrolling through long, deeply nested text.

Advanced JSON tools

Need more than the basics? Our developer tools go further.