Skip to content

Install ALink Tools

Free browser tools for images, PDFs, media, text and web checks. Most tools process files locally on your device.

  1. Tap the Share button in the Safari toolbar.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. ALink Tools then opens from your Home Screen like an app.

YAML to JSON

Paste YAML and get JSON, using the js-yaml parser in this tab. Multiple documents can be collected into a JSON array. This is YAML 1.1 as implemented by js-yaml, not a full YAML 1.2 library.

Runs in your browserjs-yaml (MIT)Runs in your browser
1

YAML

Limits

  • The input is limited to 2 MB of UTF-8 text (8 MB if you load a file). Larger files can run out of memory in a phone browser tab.
  • YAML 1.1 (js-yaml default schema), not a complete YAML 1.2 implementation.
  • Custom tags, explicit type tags beyond the default schema, and some merge-key cases are not supported.
  • JSON cannot represent repeated anchors as shared references; js-yaml is used with noRefs when going the other way.
  • Duplicate keys: later keys overwrite earlier ones, as in typical JS objects.
2

JSON

How to use YAML to JSON

  1. Paste YAMLType, paste or load a .yaml / .yml file.
  2. Choose optionsSet JSON indent, and turn on “all documents” if the file uses --- separators.
  3. Copy or downloadCopy the JSON or download a .json file.

js-yaml and YAML versions

Conversion is done by js-yaml 4 (MIT) with its default schema. That schema follows YAML 1.1 in several details: values such as on/off, yes/no and some sexagesimal numbers may become booleans or integers, and some YAML 1.2-only constructs are not accepted.

Custom tags, merge keys in every edge case, and circular anchors that cannot be expressed in JSON will fail or drop information. Binary tags are not written as bytes in the JSON; they become strings or are rejected. Very large files may run out of memory.

Frequently asked questions

Is my text or file uploaded?

No. Everything runs in your browser tab with JavaScript. Nothing you type, paste or drop is sent to a server, logged or stored by ALink Tools.

Why did “on” become true?

YAML 1.1 treats on, off, yes and no as booleans. Quote the value if you want a string: "on".

Can I convert several documents at once?

Yes. Turn on “Convert all documents” and a --- separated stream becomes a JSON array.

Is the YAML sent to a server?

No. js-yaml runs in this tab.

Related tools

All tools