🛠️DevTools

JSON to GitHub Actions

Convert CI/CD workflow definitions from JSON to GitHub Actions YAML format.

Switch tool:
Examples:
YAML output will appear here...

💡 Paste your JSON and it converts to YAML automatically. Perfect for Kubernetes, Docker Compose, and other DevOps configurations.

Code Examples

Here's how to achieve this in different programming languages:

1// Using js-yaml library (npm install js-yaml)
2import yaml from 'js-yaml';
3
4const jsonData = `{"name": "CI", "on": {"push": {"branches": ["main"]}, "pull_request": {"branches": ["main"]}}, "jobs": {"build": {"runs-on": "ubuntu-latest", "steps": [{"uses": "actions/checkout@v4"}, {"name": "Run tests", "run": "npm test"}]}}}`;
5const parsed = JSON.parse(jsonData);
6const yamlOutput = yaml.dump(parsed);
7console.log(yamlOutput);
8
9// Output:
10// name: CI
11// on:
12// push:
13// branches:
14// - main
15// pull_request:
16// branches:
17// - main
18// jobs:
19// build:
20// runs-on: ubuntu-latest
21// steps:
22// - uses: actions/checkout@v4
23// - name: Run tests
24// run: npm test

More JSON Examples

Related JSON Tools

📚 Learn More