🛠️DevTools

GitHub Actions to JSON

Convert CI/CD workflow YAML to JSON for programmatic analysis and manipulation.

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

💡 Paste your YAML and it converts to JSON automatically. Perfect for converting Kubernetes and Docker Compose configs.

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 yamlData = `name: CI
5on:
6 push:
7 branches:
8 - main
9jobs:
10 build:
11 runs-on: ubuntu-latest
12 steps:
13 - uses: actions/checkout@v4
14 - name: Run tests
15 run: npm test`;
16const parsed = yaml.load(yamlData);
17const jsonOutput = JSON.stringify(parsed, null, 2);
18console.log(jsonOutput);
19
20// Output:
21// {
22// "name": "CI",
23// "on": {
24// "push": {
25// "branches": ["main"]...

More YAML Examples

Related YAML Tools

📚 Learn More