Convertools Dev
All tools

Convert YAML to JSON

Turn YAML configs into JSON, with errors shown by line and column.

YAML input

Paste text or drop a file here (up to 50 MB).

JSON result

Free to use. Your input stays in this browser.

How to use it

  1. Paste YAML or drop a .yaml or .yml file.
  2. Choose the JSON indentation.
  3. Copy the result or download it as a .json file.

YAML is read with the YAML 1.2 core schema. Anchors and aliases are expanded, merge keys (<<) are applied, and documents separated by --- become a JSON array.

Dates such as 2024-01-05 stay strings. Values that JSON cannot hold, such as .inf and .nan, become null.

Example

YAML input
# Shared settings
defaults: &defaults
  restart: always
  image: nginx:1.27
services:
  web:
    <<: *defaults
    ports:
      - "80:80"
  api:
    <<: *defaults
    image: node:22
    environment:
      NODE_ENV: production
      DEBUG: "false"
JSON result
{
  "defaults": {
    "restart": "always",
    "image": "nginx:1.27"
  },
  "services": {
    "web": {
      "restart": "always",
      "image": "nginx:1.27",
      "ports": [
        "80:80"
      ]
    },
    "api": {
      "restart": "always",
      "image": "node:22",
      "environment": {
        "NODE_ENV": "production",
        "DEBUG": "false"
      }
    }
  }
}