JSON to GitHub Actions YAML

Turn a JSON workflow definition into a clean .github/workflows file, ready to commit.

Output options

JSONinput

Empty

YAMLoutput

YAML output appears here

Runs entirely in your browser, so nothing is uploaded. Fair-use limits apply (5 MB per input, rate-limited conversions) to prevent spam and bots.

Load from URL

The file is fetched directly by your browser, so the server must allow cross-origin requests.

Keyboard shortcuts

Ctrl / ⌘ + Enter Convert now
Ctrl / ⌘ + S Download the output
Alt + Shift + C Copy the output
Alt + Shift + F Fix and format the JSON input
Alt + Shift + S Swap direction
Alt + Shift + T Cycle through code, tree and map views
Ctrl / ⌘ + Z Undo, including Format, Fix and Clear
Esc Leave full screen
Editor text size

A workflow, from JSON to YAML

Triggers, matrix values, expressions and multi-line scripts all come out the way you would write them by hand.

workflow.json
{
  "name": "CI",
  "on": {
    "push": {
      "branches": [
        "main"
      ]
    }
  },
  "jobs": {
    "test": {
      "runs-on": "ubuntu-latest",
      "strategy": {
        "matrix": {
          "node": [
            "20",
            "22"
          ]
        }
      },
      "steps": [
        {
          "uses": "actions/checkout@v4"
        },
        {
          "uses": "actions/setup-node@v4",
          "with": {
            "node-version": "${{ matrix.node }}"
          }
        },
        {
          "run": "npm ci\nnpm test\n"
        }
      ]
    }
  }
}
.github/workflows/ci.yml
name: CI
'on':
  push:
    branches:
      - main
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node:
          - '20'
          - '22'
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node }}
      - run: |
          npm ci
          npm test

What to watch for in workflow files

Switch between the converter's output and the same lines written without quotes, and compare how each YAML version reads them.

The on key

A bare on is true in YAML 1.1. Quoting it as 'on' keeps every parser and linter happy.

Version strings

Matrix values like '20' or '3.10' stay quoted, so Python 3.10 never turns into 3.1.

Literal run blocks

Strings with line breaks become run: | blocks, keeping every command on its own line.

More tools

Converters, validators and step-by-step guides for every place JSON and YAML meet.

Frequently asked questions

How do I convert JSON to a GitHub Actions workflow?

Paste the JSON into the editor, copy the YAML and save it in your repository under .github/workflows/, for example .github/workflows/ci.yml. The workflow runs on the next matching event.

Why is the on key written as 'on'?

In YAML 1.1, a bare on is the boolean true, so some tools read the trigger key as true instead of on. Quoting it removes the ambiguity. GitHub accepts both forms, so 'on': is safe everywhere.

Are ${{ }} expressions kept?

Yes. Expressions such as ${{ matrix.node }} and ${{ secrets.TOKEN }} are plain strings in both JSON and YAML and are written exactly as they appear in the input.

How are multi-line run scripts converted?

A JSON string containing \n line breaks becomes a YAML literal block (run: |), with one command per line, which is how workflow scripts are normally written.

How do I check a workflow before pushing it?

This converter checks YAML syntax. For workflow-specific checks such as unknown keys, invalid expressions or wrong runner labels, run actionlint locally or in CI.