How to use YAML and JSON Converter
- Paste a YAML or JSON document, or a YAML stream with documents separated by ---.
- Choose the conversion direction.
- 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.
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.