YAML to JSON converter

Move a config between the two formats tools disagree on. Paste a Compose file, a workflow or an OpenAPI document and get the other format, or the line where the syntax breaks.

How it works

  1. Paste the YAML or the JSON.
  2. Choose the direction.
  3. Press Convert and copy the result.

Are comments kept?

No. JSON has no comments, so they are lost going from YAML to JSON, and JSON has none to carry back.

Which YAML version is read?

YAML 1.2, the version current tools use. Anchors and aliases are resolved into plain values.

Why does my YAML fail?

Most often a tab used for indentation or a missing space after a colon. The error names the line.

Use it from ChatGPT, Claude or your own agent

This tool is also a function an AI agent can call for you. It needs the same free account as this page, nothing else.

Fields

  • text (text, required): YAML or JSON
  • direction ("yaml-to-json" | "json-to-yaml", optional): Direction

A call that works

POST https://orkosi.com/api/v1/public/tools/yaml-json-converter/run
Authorization: Bearer <api_key>

{
  "input": {
    "text": "services:\n  web:\n    image: nginx:1.27\n    ports:\n      - \"80:80\"\n    restart: always\n",
    "direction": "yaml-to-json"
  }
}

Need an account? One request creates it and answers the key: POST https://orkosi.com/api/v1/public/signup. In Claude or ChatGPT, add the Orkosi connector and sign in: https://orkosi.com/api/v1/public/mcp.

This tool as Markdown · Connect an AI assistant