Skip to content
JustDevTools
  • JSON formatter and validator
    Format, minify and validate JSON, with the exact line and column of any syntax error.
  • JWT decoder
    Read a JWT's header and payload, with issued-at and expiry times shown as real dates.
  • Base64 encoder and decoder
    Encode and decode Base64 and Base64URL, with full Unicode support.
  • JSON to TypeScript, Zod and Java
    Paste a JSON response and get TypeScript interfaces, a Zod schema or Java classes with Jackson annotations.
  • YAML to JSON converter
    Convert YAML to JSON and JSON to YAML, with the exact line of any syntax error. Handles multi-document files.
  • Regex tester
    Test JavaScript regular expressions with live match highlighting, capture groups and replace preview.
  • URL encoder and decoder
    Percent-encode and decode URLs and query values, and break a URL into its parts and parameters.
  • Unix timestamp converter
    Convert Unix timestamps in seconds or milliseconds to dates, and dates back to timestamps.
  • Cron expression explainer
    See what a cron expression means in plain English, what each field does and the next times it will run.
  • JSON to CSV converter
    Turn a JSON array into CSV for Excel or Google Sheets, or a CSV file into JSON. Nested objects become columns.
  • UUID generator and inspector
    Generate UUID v4 and time-ordered v7 in bulk, or paste a UUID to see its version and timestamp.
  • Text diff checker
    Compare two texts line by line and see exactly what was added, removed or changed.
  • Hash and HMAC generator
    SHA-256, SHA-1, SHA-384 and SHA-512 hashes and HMAC signatures of text, in hex or Base64.
  • Markdown previewer
    Write Markdown on the left and see it rendered live on the right, with GitHub-style tables and task lists.

YAML to JSON converter

Convert YAML to JSON and JSON to YAML, with the exact line of any syntax error. Handles multi-document files.

Runs locally. Nothing you paste leaves this tab.

Valid YAML, converted to JSON.

JSON

{
  "apiVersion": "apps/v1",
  "kind": "Deployment",
  "metadata": {
    "name": "orders-api",
    "labels": {
      "app": "orders"
    }
  },
  "spec": {
    "replicas": 3,
    "template": {
      "spec": {
        "containers": [
          {
            "name": "api",
            "image": "orders-api:1.4.2",
            "ports": [
              {
                "containerPort": 8080
              }
            ],
            "env": [
              {
                "name": "LOG_LEVEL",
                "value": "info"
              }
            ]
          }
        ]
      }
    }
  }
}

Convert YAML to JSON and back

Paste YAML on the left and the JSON appears on the right as you type. Switch the direction to turn JSON into YAML. Swap feeds the result back in, which is a quick way to check that nothing is lost in a round trip. If the input has a syntax error, the tool shows the line and column.

Where you meet YAML

Kubernetes manifests, Docker Compose files, GitHub Actions and GitLab CI pipelines, Ansible playbooks, OpenAPI specs and Spring Boot's application.yml are all YAML. APIs, on the other hand, almost always speak JSON. YAML is a superset of JSON, so every JSON document is also valid YAML, but not the other way round.

Indentation errors

YAML uses indentation instead of brackets, so a single misplaced space changes the meaning or breaks the file. Use spaces, never tabs, and keep items in the same list or mapping at exactly the same depth. When the tool reports “bad indentation”, look at the line it points to and the line above it.

# Wrong: "image" is indented one space too far
containers:
  - name: api
     image: orders-api:1.4.2

# Right
containers:
  - name: api
    image: orders-api:1.4.2

Several documents in one file

A line with --- starts a new document, which is common in Kubernetes files that define several resources. This tool converts a multi-document file into a JSON array with one item per document.

Values that change type

YAML guesses types for unquoted values. port: 8080 is a number, enabled: true is a boolean and zip: 01234 becomes the number 1234. Older YAML 1.1 parsers also read yes, no, on and off as booleans, which famously turns the country code NO (Norway) into false. When a value must stay text, put it in quotes. When converting JSON to YAML, this tool quotes strings such as "true", "null" and "01234" so they stay text. It follows YAML 1.2, which treats yes and no as text and leaves them unquoted; if an older YAML 1.1 tool will read the file, quote those yourself.

Comments and anchors

JSON has no comments, so YAML comments are dropped when converting to JSON. Anchors and aliases (&defaults and *defaults) are expanded into full copies. Files that expand aliases an excessive number of times are rejected, so a malicious file can't freeze your browser.