Skip to main content

YAML to JSON

Convert YAML data to JSON format.

1
Upload
2
Configure
3
Convert
4
Download

Convert YAML data to JSON format.

Choose a file to get started
Drag and drop a supported file here, or press Enter to browse your device.

Related tools

Ready tools are shown first.

Tool guide

Free Online YAML to JSON Converter

Convert simple key-value YAML and nested mappings into formatted JSON directly in your browser. The lightweight parser handles common scalar values but intentionally rejects YAML arrays and advanced YAML constructs.

Steps

How it works

  • Paste YAML or choose one YAML, YML, or plain-text file.
  • Parse non-empty key-value lines and indentation-based nested mappings.
  • Convert supported scalar values into JSON values.
  • Review, copy, or download the formatted JSON output.

Highlights

Key features

  • Supports simple key-value YAML and indentation-based nested objects.
  • Recognizes lowercase true, false, null, and basic numeric scalar values.
  • Accepts basic quoted and unquoted string values.
  • Ignores full lines whose first non-space character is a comment marker.
  • Produces indented JSON for copying or download.

Use cases

Common uses

  • Convert a simple YAML settings file into JSON.
  • Inspect nested key-value YAML as a JavaScript-friendly object.
  • Prepare basic mapping data for a JSON workflow.
  • Translate straightforward scalar configuration values.

Notes

Limitations to know

  • YAML sequences and array lines are explicitly unsupported.
  • Anchors, aliases, merge keys, tags, block scalars, multi-document input, complex keys, and other advanced YAML syntax are unsupported.
  • Comments are not preserved, and inline comment text can be interpreted as part of a value.
  • Duplicate keys overwrite earlier values, and YAML-version-specific typing is not implemented.
  • One input is processed at a time; batch conversion and lossless YAML reconstruction are unavailable.

FAQ

Frequently asked questions

5 answers
Can this convert YAML arrays?

No. The current browser-only parser rejects YAML sequence lines and supports simple nested mappings only.

Are YAML anchors and aliases supported?

No. Anchors, aliases, merge keys, tags, and other advanced YAML features are unsupported.

Are YAML comments preserved?

No. Full comment lines are ignored and comments are not represented in JSON.

How are scalar values handled?

Lowercase true, false, null, and basic numbers become matching JSON values; other supported content becomes strings.

What happens to duplicate YAML keys?

A later key assignment overwrites the earlier value in the generated JSON object.

Copied to clipboard