InTab

JSON to YAML Converter

Turn JSON into clean YAML (and back) for configs, Kubernetes and CI files.

Converters: Turn one format into another. It runs in your browser, so nothing you enter is uploaded.

What it does

The JSON to YAML Converter turns JSON into clean, readable YAML, and converts YAML back to JSON. It is made for configuration: Kubernetes manifests, Docker Compose files, GitHub Actions and other CI pipelines, OpenAPI specs and app settings.

How to use it

  1. Paste JSON, open a file, or click Load sample.
  2. Choose 2 spaces or 4 spaces.
  3. Copy or download the YAML.
  4. Click Swap direction to convert YAML to JSON instead.

Example

{
  "app": { "name": "InTab", "version": "1.0.0", "debug": false },
  "servers": [
    { "host": "alpha.local", "port": 8080 },
    { "host": "beta.local", "port": 8081 }
  ]
}

As YAML:

app:
  name: InTab
  version: 1.0.0
  debug: false
servers:
  - host: alpha.local
    port: 8080
  - host: beta.local
    port: 8081

Good to know

  • Strings that look like numbers, dates or booleans are quoted in the YAML output, so their type does not change when the file is read back.
  • Long strings stay on one line.
  • The same page also converts XML, CSV and TOML: choose them in the From and To lists.

FAQ

Is YAML a superset of JSON? Yes, almost all JSON is valid YAML. Converting still helps, because block-style YAML is far easier to read and review.

Why are my comments gone after converting YAML to JSON? JSON has no comments, so there is nowhere to keep them.

Guides

More Converters tools

  • JSON to Code: Generate TypeScript, C#, Java, Python, Go, Kotlin, Swift, Rust, PHP, Dart types from JSON.
  • XML to Code: Generate C# (XmlSerializer), Java (JAXB), Go and TypeScript classes that read your XML.
  • Data Format Converter: Convert between JSON, YAML, XML, CSV and TOML in any direction.
  • XML to JSON Converter: Convert XML documents to JSON, keeping attributes, and back again.
  • Number Base Converter: Convert numbers between binary, octal, decimal and hexadecimal.
  • Color Converter: Convert colors between HEX, RGB, HSL, HSV and CMYK.
  • Case Converter: camelCase, snake_case, kebab-case, PascalCase and more.