Text and dataRuns in your browser

YAML ↔ JSON Converter

Convert mappings, sequences, and scalars between JSON and a predictable YAML configuration subset without uploading data.

  • Two-way conversion
  • Safe subset
  • Up to 5,000 nodes
Online tool

Try the tool

Add your data, choose the settings, and get the result.

Input data

Result

—

The YAML parser supports a safe configuration subset: mappings, sequences, quoted/plain scalars, and JSON-style inline collections. Anchors, aliases, custom tags, merge keys, and block scalars are rejected.

Your data stays here

Text and selected files are processed in the current browser and are not sent to a server to produce the result.

Reviewed: 2026-07-17
01

How to use it

  1. 1

    Choose YAML → JSON or JSON → YAML.

  2. 2

    Paste the document and run the conversion.

  3. 3

    Copy the result and verify it in the target application.

02

What the tool can do

  • Indented mappings and sequences using two-space indentation.
  • Plain, single-quoted, and double-quoted scalars, numbers, booleans, and null.
  • Inline arrays and objects when written with JSON syntax.
  • JSON → YAML for JSON-compatible values with safe quoting of ambiguous strings.
03

Common use cases

  • Preparing a simple CI/CD or application configuration.
  • Finding duplicate keys and indentation errors.
  • Converting a safe fixture between JSON and YAML.
04

How it works inside

YAML indentation must use multiples of two spaces; tabs are rejected.

Input is limited to 500,000 characters, 5,000 nodes, and depth 32.

05

Questions and answers

Why are anchors and aliases rejected?

The tool deliberately excludes graph-like and tag-driven features so the conversion contract remains bounded and predictable.

Are comments preserved?

No. JSON has no comment model, so a round trip cannot preserve them without a separate AST contract.