UtilDojo

Popular

Menu

JSON to YAML Converter Online

  • This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.

JSON

Tab indents · Shift+Tab outdents · Esc then Tab moves on

YAML

Your YAML shows up here

Paste or type on the left, upload a file, or drop one onto the input.

Waiting for input

JSON & data

About this tool

Paste JSON and get the equivalent YAML immediately — no quotes around simple strings, no braces, just indentation. It’s the quickest way to turn an API response or package.json snippet into a config file.

Long strings are never wrapped, and repeated objects are written out in full rather than as anchors and aliases, so the output is easy to read and edit. For example, {"name":"app","ports":[80,443]} becomes name: app followed by ports: with “- 80” and “- 443” on their own lines.

Pick 2 or 4 spaces, then copy the result or download it as data.yaml. Invalid JSON is reported as “Invalid JSON” with the parser’s message. The arrow button swaps direction, and when there is output it moves it into the input, so you can round-trip a document between the two formats and check that nothing was lost.

Some details are worth knowing. Standard JSON.parse rules apply, so comments, trailing commas and single-quoted strings are rejected; fix them in the JSON formatter with Repair first. Numbers beyond JavaScript’s safe integer range lose precision, and if an object repeats a key the last value wins. Keys that look like whole numbers, such as "10" or "2", are ordered numerically by JavaScript, so those can move to the front of an object.

YAML has no comments in this direction, since JSON carries none. Add them by hand afterwards. Nothing is sent to a server.

Frequently asked questions

Will the YAML parse back to the same JSON?

Yes. Values are quoted wherever needed so that strings like “true” or “08” stay strings.

Can I control indentation?

Choose 2 or 4 spaces. YAML does not allow tabs for indentation.

Does key order change?

Keys are written in the same order as in your JSON, with one JavaScript quirk: keys that are whole numbers are listed first in ascending order.

Can I convert several JSON documents at once?

The input must be a single JSON value. Wrap multiple objects in an array, and you get a YAML list.

Why does my JSON fail to convert?

The usual causes are a trailing comma, single quotes, unquoted keys or a comment. Strict JSON allows none of these.

Can I go from YAML back to JSON?

Yes. Use the switch button, or open the YAML to JSON converter. Multi-document YAML separated by --- becomes a JSON array.

Related tools