YAML ↔ JSON Converter: Indentation, Tabs and Error Lines

What is it?

The YAML ↔ JSON Converter turns YAML (used in Docker, Kubernetes, GitHub Actions and config files) into JSON and back.

Who is it for?

Developers and DevOps engineers working with Docker, Kubernetes and CI files, and anyone converting configuration between formats.

How to use it

  1. Choose YAML → JSON or JSON → YAML.
  2. Paste the text. Errors show the line where the problem is.

Fixing “YAML problem”

  • Tabs: YAML doesn’t allow tabs for indentation. Replace them with spaces (2 per level is common).
  • Uneven indentation: items in the same list or map must line up exactly.
  • A colon inside a value, like title: Note: read this: wrap the value in quotes.
  • A missing space after the colon: key:value must be key: value.

Values that change type

  • yes, no, on and off may become true/false in some YAML readers. Quote them if you mean text.
  • Version numbers like 1.10 become the number 1.1. Quote them: "1.10".
  • Leading zeros (PIN codes, phone numbers) can be lost: quote them.

Comments in YAML (# …) are dropped when converting to JSON, because JSON has no comments.

Tip

Paste a docker-compose.yml to check its structure: if it converts to JSON cleanly, the YAML is valid.

Worked example

name: app
ports:
  - 80
  - 443

becomes {"name":"app","ports":[80,443]}. Converting back gives the same YAML with two-space indentation.

Open the tool: YAML ↔ JSON Converter

Still stuck?

Contact support. Tell us which tool or page you were using, what you tapped, what you saw, and your phone or computer and browser (for example: Android phone, Chrome). We reply by email.

Questions, or an error not listed here?

Tell us in the comments: what you were doing, the exact message you saw, and your device and browser. We read every comment and add new fixes to this article.