Skip to content

Free YAML to JSON

Convert YAML to JSON. Completely free, with no sign-up and no upload.

  • 100% free
  • No sign-up
  • No watermark
  • Works in your browser

Also called: YAML to JSON converter, convert YAML to JSON.

About YAML to JSON

Turn YAML into JSON for APIs, tests and tools that only read JSON. Anchors and aliases are resolved, key order is kept, and syntax errors come with a line and column. If the YAML holds several documents separated by ---, the result is a JSON array with one entry per document, and the tool tells you so.

How to use YAML to JSON

  1. Paste your YAML or open a .yaml or .yml file.
  2. Pick a JSON layout: 2 spaces, 4 spaces, tab or minified.
  3. Optionally sort keys A–Z.
  4. Copy the JSON or download converted.json.

Tips and good to know

  • YAML dates such as 2001-01-01 stay as text because YAML 1.2 does not turn them into dates.
  • Values such as .inf and .nan have no JSON form, so they become null and a note appears.
  • A self-referencing alias cannot be written as JSON and gives an error.

Why convert YAML to JSON

JSON is stricter and supported by every language and API, so converting YAML is a good way to see exactly how a parser reads your indentation and values.

YAML pitfalls to know

YAML relies on indentation, and tabs are not allowed for indenting — only spaces. A famous trap is the “Norway problem”: in older YAML 1.1 parsers the unquoted value NO (the country code for Norway) is read as the boolean false, and values such as yes, on and off are booleans too. Version numbers like 1.10 can become the number 1.1. Quoting values removes the ambiguity.

Every JSON document is also valid YAML 1.2, which is why converting from JSON to YAML always works, while YAML features such as comments and anchors have no JSON equivalent and are lost when converting the other way.

Frequently asked questions

What happens to comments?

JSON has no comments, so they are dropped.

Are non-text keys supported?

Yes. YAML allows keys such as 1 or true; JSON only has text keys, so they are written as "1" and "true".

Is YAML to JSON free?

Yes. YAML to JSON is 100% free: no sign-up, no paid plan, no trial and no limit on how often you use it. It runs in your browser, and ToolzAura is paid for by ads, so every tool stays free.

Are my files uploaded?

No. This tool runs in your browser, so your input stays on your device.

Maintained by Malik Shaheer · Last reviewed · How we test tools · Report a problem

Related tools

Base64 Encode and Decode

Convert text to and from Base64.

Developer Tools

Binary Translator

Convert text to binary and back.

Developer Tools

Hash Generator

Create SHA-1, SHA-256 and SHA-512 hashes.

Developer Tools

JWT Decoder

Decode a JWT header and payload locally.

Developer Tools

Password Strength Checker

Test how resistant a password is to guessing.

Developer Tools

Unix Timestamp Converter

Convert between Unix timestamps and readable dates.

Developer Tools