JSON to YAML Converter

Drag and drop a file containing JSON into the box below to convert it to YAML.

How do I convert JSON to YAML?

Drag files containing JSON into the box above to have them converted to YAML.

Why use YAML instead of JSON?

Many people consider YAML to be a bit easier on the eyes than JSON. It uses significant whitespace, much like python does, which means YAML is always indented in a reasonable way. Its syntax for lists is similar to the natural list notation people use when writing todo lists and emails. This makes it very readable for simple configuration files, which is one of it’s most popular use, most notable by Ruby on Rails.

YAML is much more feature rich than JSON. YAML supports lists and associative arrays (objects in JSON) as JSON does, but it also allows you to label components using “anchors” and then reference those labels elsewhere in your document, allowing you to avoid repetition. It also allows you to specify data types, such as specific numeric types, or even user defined types.

So What’s HAML then?

HAML is a markup language that looks a lot like YAML, and is commonly used with Rails to generate HTML. It’s popular because it has has less repetition than HTML, relying on significant whitespace rather than closing tags. It’s often half the lengh of HTML, and twice as ugly.