YAML and JSON Converter

Convert JSON and YAML, including a stream of YAML documents exported as one JSON array.

On-device No sign-up Free to use

Convert YAML and JSON controls

Showing an example. Edit to see your own.

?

Paste one document, or use the multiple-document direction for a YAML stream separated by ---. Custom YAML tags are not accepted.

Processed in your browser. Your inputs stay on this device.

Result

Showing an example.

Convert a YAML name, boolean and two-item list into a JSON object.

{
  "name": "Ada",
  "active": true,
  "items": [
    "one",
    "two"
  ]
}

Loading the tool. Your result will appear here.

https://usefreetools.net/yaml-json-converter · 20 November 2026

Was this helpful?

How to use YAML and JSON Converter

  1. Paste a YAML or JSON document, or a YAML stream with documents separated by ---.
  2. Choose the conversion direction.
  3. The converted document or parsing error updates as you edit the source and direction. Check number types and quoting before copying the output.

Example: YAML and JSON Converter

Convert a YAML name, boolean and two-item list into a JSON object.

You add
YAML or JSON: name: Ada active: true items: - one - two; Direction: yaml-to-json
You get
{ "name": "Ada", "active": true, "items": [ "one", "two" ] }

Options

YAML or JSON
Paste one document, or use the multiple-document direction for a YAML stream separated by ---. Custom YAML tags are not accepted.
Direction
Use YAML to JSON for one document, Multiple YAML documents to JSON array for a stream separated by ---, or JSON to YAML for one JSON value. Stream mode preserves document order and allows up to 100 documents.

Supported inputs and limits

  • Input is limited to 500,000 characters and 100 nesting levels.
  • Multi-document mode accepts up to 100 YAML documents and writes them in order as one JSON array.
  • Values must be JSON-compatible; custom tags, typed date/binary values and circular aliases are refused.
  • Date-looking strings can remain strings.
  • YAML comments and anchor notation do not survive conversion.
More details

Numeric spelling and quoting may change, and browser numbers can round long numeric IDs; quote identifiers before converting.

Parser errors include a line and column when available.

Where your input is processed

This tool does not upload your inputs. See the limits for anything saved on your device.

Questions about YAML and JSON Converter

Will YAML comments appear in JSON?

No. JSON has no comments, so YAML comments are lost when the document is parsed.

Can I convert several YAML documents at once?

Yes. Choose Multiple YAML documents to JSON array and separate documents with ---. The converter exports up to 100 documents in their original order.

Why did a long numeric ID change?

JavaScript numbers cannot exactly hold every long integer. Quote IDs as strings before conversion.

Can this run a custom YAML tag?

No. The converter uses JSON-compatible YAML values and rejects custom types.

Page updated · Project managed by Tony Hines · Report a problem with YAML and JSON Converter

Related reading

All guides