DuckyTools
Home Convert YAML to JSON

YAML to JSON Convert

Convert YAML configuration into JSON.

YAML to JSON is a free online tool that convert YAML configuration into JSON. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.

Price
Free — no account, no quota, no watermark
Category
Convert
Where it runs
In your browser, on your device
Files uploaded
None
Technology
plain JavaScript
Settings
1
Works offline
Yes, after the first visit

About YAML to JSON

Converting the other way exposes what a YAML file actually contains, which is frequently a surprise: unquoted `1.0` is a number and loses its trailing zero, `12:30` may parse as a sexagesimal integer under YAML 1.1, and a version string like `1.10` becomes 1.1. Seeing the JSON is the quickest way to find out what your config loader really received.

How to use it

  1. Paste the text you want to run through yaml to json.
  2. Set indent.

The one setting

SettingWhat it doesDefault
IndentChoose from 2: 2 spaces, 4 spaces.2 spaces

Under the hood

Runs onplain JavaScript — runs the whole thing
ControlsIndent

Questions

Why did my version number change?

It was read as a float. `version: 1.10` becomes 1.1 because trailing zeros in a number are meaningless. Quote it — `version: "1.10"` — and it stays a string.

What happens to YAML comments and anchors?

Comments are dropped, because JSON has nowhere to put them. Anchors and aliases are resolved, so shared structure is expanded inline and the JSON may be noticeably larger.