Ctrl + K
Converters

YAML to JSON / JSON to YAML

Convert configuration files easily between structured JSON and clean YAML formats.

YAML Input 15 lines
JSON Output 25 lines

All conversions happen locally in your browser. Your data is never sent to any server. The tool uses a custom indentation-based YAML parser and serializer.

YAML (YAML Ain't Markup Language) is the most popular format for configuration files — used by Docker Compose, Kubernetes, CI/CD pipelines, Ansible, and countless developer tools. Our YAML to JSON converter transforms clean YAML into structured JSON, while the reverse JSON to YAML converter generates readable, indentation-based YAML from any JSON object.

Example Conversion

YAML Input

app:
  name: 365utils
  version: 2.0
  database:
    host: localhost
    port: 5432
  features:
    - json-formatter
    - qr-generator

JSON Output

{
  "app": {
    "name": "365utils",
    "version": 2,
    "database": {
      "host": "localhost",
      "port": 5432
    },
    "features": [
      "json-formatter",
      "qr-generator"
    ]
  }
}

Conversion Features

  • Indentation-Based Parsing

    Correctly handles nested mappings and sequences using indentation levels.

  • Scalar Type Detection

    Auto-detects strings, numbers, booleans, and null values from YAML input.

  • Inline Collections

    Supports inline JSON-like syntax: [a, b] and {k: v}.

  • Comment Stripping

    YAML comments (#) are stripped during parsing while preserving structure.

  • Proper Quoting

    Strings requiring quotes in YAML (special chars, booleans, numbers) are automatically quoted.

  • 100% Private

    All parsing happens client-side. No data is uploaded to any server.

Frequently Asked Questions

What YAML features are supported?
The parser supports mappings (key: value), sequences (- item), nested structures, inline JSON-like collections, quoted strings, comments, and automatic scalar type detection. Advanced features like anchors (&), aliases (*), multi-document streams (---), and multi-line block scalars (|, >) are not supported.
When should I use YAML instead of JSON?
YAML is preferred for configuration files that humans read and edit. It supports comments, is less verbose than JSON, and uses indentation for structure. JSON is better for data interchange between systems, API payloads, and machine-generated data.
Is indentation important in YAML?
Yes. YAML uses indentation (spaces, not tabs) to define structure. Consistent indentation is critical — mixing spaces and tabs or using inconsistent levels will cause parse errors. The converter uses 2-space indentation.