Code tool

JSON to YAML Converter

Turn a JSON value into YAML for a configuration file, documentation example, or data workflow without uploading the source.

In-browser processingNo account requiredPrivacy details ↗

Enter any valid JSON value. Maximum 100,000 characters.

Wrapping changes layout only; parsed string values remain the same.

A QUICK WALKTHROUGH

How to use this tool

  1. Paste a valid JSON value up to 100,000 characters.
  2. Choose two- or four-space indentation and whether long lines may wrap near 80 columns.
  3. Convert, review the YAML, then copy it or download a .yaml file.

YAML 1.2 with type-safe strings

The converter uses the YAML 1.2 core schema. It quotes ambiguous strings when needed so a JSON string such as “null” or “true” remains a string after a YAML parser reads it. Arrays keep their order, and object keys follow the order produced by the browser JSON parser.

JSON boundaries still apply

Comments, trailing commas, undefined, and other JavaScript-only values are not valid JSON. JSON cannot express YAML anchors, aliases, tags, or comments, so the converter does not invent them. JavaScript cannot exactly represent every large JSON integer; keep exact identifiers outside the safe integer range as strings.

GOOD TO KNOW

Common questions

Does it accept JSON arrays and primitive values?

Yes. The root may be an object, array, string, number, boolean, or null as long as the input is valid JSON.

Will strings such as true or null change type?

No. The YAML serializer quotes strings when necessary to preserve their string type.

Does conversion upload my JSON?

No. Parsing, conversion, copying, and download preparation happen in your browser.