JSON to YAMLONLINE

Convert valid JSON into readable YAML 1.2 without rounding number tokens.

1 MiB per input · Ctrl / ⌘ + Enter to run

YAML 1.2 output · quoted strings · original numeric tokens · duplicate object names rejected.

Result
Ready. Paste input, then run the tool.
Your JSON stays in your browser. Core processing happens locally.
THE PRACTICAL GUIDE

Convert JSON to YAML for readable configuration

JSON to YAML translates JSON objects and arrays into YAML mappings and sequences for systems that prefer YAML configuration or documentation.

When should you use it?

  • Start a YAML configuration from an API example.
  • Make nested data easier to read in documentation.
  • Move a JSON fixture into a YAML-based workflow.
WORKED EXAMPLE

Example: object members become YAML mappings

Quoted text stays a string while the boolean remains a boolean in YAML 1.2.

JSON input
{"name":"Alex","active":true}
YAML output
"name": "Alex"
"active": true

Preserve the value behind the new syntax

YAML uses indentation for structure and can omit quotes in many places where JSON requires them. A converter must still distinguish strings from numbers, booleans, and null. A string that looks like a boolean should remain a string when another parser loads the output. This tool emits YAML 1.2 and retains the original JSON number tokens during conversion.

Review the receiving configuration format

Valid YAML is only the starting point for a configuration file. A deployment system may require particular keys, a schema, or an older YAML interpretation. Check the consumer documentation before replacing a JSON configuration. JSON has no comments, anchors, or custom tags to carry across, so this conversion produces a data representation rather than a hand-authored YAML file with explanatory comments.

AT THE WORKBENCH

Turn JSON into a readable YAML document.

Create YAML mappings and sequences for configuration files and documentation. Strings stay explicitly quoted to keep values such as "true" and "001" as strings.

  1. Load valid JSON

    Paste a document or open a local UTF-8 file.

  2. Convert the structure

    Objects become mappings and arrays become sequences.

  3. Export YAML

    Copy the text or download a .yaml file.

IN PRACTICE

How do I convert JSON to YAML without turning a string into a boolean?

Use JSON to YAML on a valid document. The converter emits quoted string scalars where needed, so text such as "true" stays text while the JSON boolean true remains a boolean. Objects become mappings and arrays become sequences.

JSON values with different types

json
{"enabled":"true","ready":true,"retries":3}

The YAML result distinguishes the quoted enabled string from the unquoted ready boolean. Review the receiving application’s YAML version and type rules.

This converter emits the original JSON number spelling. A downstream YAML parser may still impose its own numeric precision limits, so test precision-sensitive data at the receiving end.

BEFORE YOU USE THE RESULT

What should you check before using the result?

A receiving parser can have different YAML version and numeric rules. This direction does not accept YAML input; use YAML to JSON for that.

Preserving values

The converter uses a YAML document tree with original number tokens. Large integers, decimal spelling, exponent notation, booleans, and null are retained. String escaping may change its written form while preserving its value. A downstream YAML parser can still impose its own numeric limits.

Compatibility

Output targets YAML 1.2. Check the YAML version supported by the receiving application. Duplicate JSON names are rejected because mapping consumers may discard a value. This tool converts JSON to YAML; it does not parse arbitrary YAML input.

Compare JSON and YAML

Technical reference: YAML 1.2.2 specification

THE JSON FIELD GUIDE
All guides