YAML to JSON (Free Online Tool)
Parse YAML into JSON for diff, validation, and config-normalization pipelines
Paste your JSON → Get results instantly (no signup)
⚡ Instant resultsNo signupRuns in your browser
Try examples:
→ Parse a k8s Deployment YAML into JSON for downstream diff or validation.
Output✓
Output✓
1{2 "apiVersion": "apps/v1",3 "kind": "Deployment",4 "metadata": {5 "name": "web-server",6 "namespace": "prod"7 },8 "spec": {9 "replicas": 3,10 "template": {11 "spec": {12 "containers": [13 {14 "name": "nginx",15 "image": "nginx:1.25",16 "ports": [17 {18 "containerPort": 8019 }20 ]21 }22 ]23 }24 }25 }26}Love the result?
Use this exact pipeline in your app, backend, or LLM workflow.
No setup needed. Works with curl, Node, Python.
Uses example data. For edited input, copy from the playground.
Works with:
- API responses
- Nested JSON
- Arrays & objects
Example: input → output
Input / OutputInputOutput
Related tools
- CSV to JSONParse CSV text into a JSON array of row objects for further cleanup or reshaping
- XML to JSONParse XML text into JSON for downstream normalization, validation, and reconciliation pipelines
- Table JSON to RecordsConvert table-like JSON exports with header and row arrays into normal JSON records
- JSON to CSVConvert JSON array row data into final CSV text output
- Format ValuesReformat individual values with case changes, trimming, coercion, and slugification
Advanced usage (optional)
YAML to JSON
v1.0.0Convert
string
Description
YAML to JSON
Parse YAML text into JSON. Designed as an ingress adapter for the ForgeJSON pipeline — once YAML is JSON, every downstream utility (pick fields, validate schema, clean, diff) operates on it natively.
How It Works
Paste a YAML document, get back the parsed JSON tree. js-yaml's safe loader rejects unsafe tags (!!js/function etc.) and preserves YAML's natural key order.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| Multi-document Stream | boolean | false | Parse a YAML stream (----separated documents) into an array. Useful for Kubernetes manifest bundles |
Use Cases
- Kubernetes manifests — parse a Deployment, Service, or ConfigMap YAML into JSON for diff or schema validation
- GitHub Actions workflows — convert
.github/workflows/*.ymlinto JSON for analysis - docker-compose — flatten compose files for service-level transformations
- Application config — normalize YAML configs into JSON for environment-aware merging
Common Pipeline Patterns
YAML string
→ convert.yaml-to-json
→ structure.pick-fields (extract canonical k8s shape)
→ cleanup.clean-json (normalize for diff-stable output)
→ validation.schema (assert deployment contract)Configuration
| Name | Type | Default | Description |
|---|---|---|---|
| Multi-document Stream | boolean | false | Parse a YAML stream (documents separated by `---`) into an array. Useful for Kubernetes manifest bundles. |
Examples
AI Prompt
Parse a k8s Deployment YAML into JSON for downstream diff or validation.Output✓
Output✓
1{2 "apiVersion": "apps/v1",3 "kind": "Deployment",4 "metadata": {5 "name": "web-server",6 "namespace": "prod"7 },8 "spec": {9 "replicas": 3,10 "template": {11 "spec": {12 "containers": [13 {14 "name": "nginx",15 "image": "nginx:1.25",16 "ports": [17 {18 "containerPort": 8019 }20 ]21 }22 ]23 }24 }25 }26}Config
Multi-document Stream
OFF
API Usage
POST /api/v1/utilities/convert.yaml-to-json
Example:
curl -X POST https://your-domain.com/api/v1/utilities/convert.yaml-to-json \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: web-server\n namespace: prod\nspec:\n replicas: 3\n template:\n spec:\n containers:\n - name: nginx\n image: nginx:1.25\n ports:\n - containerPort: 80\n"},"config":{"multiDocument":false}}'Response
1{2 "apiVersion": "apps/v1",3 "kind": "Deployment",4 "metadata": {5 "name": "web-server",6 "namespace": "prod"7 },8 "spec": {9 "replicas": 3,10 "template": {11 "spec": {12 "containers": [13 {14 "name": "nginx",15 "image": "nginx:1.25",16 "ports": [17 {18 "containerPort": 8019 }20 ]21 }22 ]23 }24 }25 }26}