YAML ↔ JSON
Convert YAML configuration into JSON and back, with indent control and Kubernetes or GitHub Actions presets.
Runs entirely in your browser — nothing you paste is uploaded.
Maps, sequences, flow styles, quoted strings, block scalars, and comments are supported. Anchors, aliases, and tags are not expanded.
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "ryuslog-web",
"labels": {
"app": "ryuslog",
"tier": "frontend"
}
},
"spec": {
"replicas": 3,
"selector": {
"matchLabels": {
"app": "ryuslog"
}
},
"template": {
"metadata": {
"labels": {
"app": "ryuslog"
}
},
"spec": {
"containers": [
{
"name": "web",
"image": "ghcr.io/ryuslog/web:1.4.0",
"ports": [
{
"containerPort": 3000
}
],
"env": [
{
"name": "NODE_ENV",
"value": "production"
}
],
"resources": {
"limits": {
"cpu": "500m",
"memory": "512Mi"
}
},
"readinessProbe": {
"httpGet": {
"path": "/api/health",
"port": 3000
},
"initialDelaySeconds": 5,
"periodSeconds": 10
}
}
]
}
}
}
}YAML syntax reference
quick reference- key: value
- A mapping entry. The colon must be followed by a space, and indentation must use spaces, never tabs.
- - item
- A sequence entry at its own indentation level; nested keys of one entry align under the item text.
- |
- Literal block scalar that keeps line breaks, which is what multi-line shell scripts and config files use.
- >
- Folded block scalar that joins wrapped lines with spaces, for long single paragraphs.
- [a, b] / {k: v}
- Flow style abbreviations for a short sequence or mapping on one line.
- # comment
- Comments run to the end of the line and are lost when the document is converted to JSON.
Related Kubernetes syntax guides
All Kubernetes guideskubectl Output: jsonpath, custom-columns, and the Debugging Commands Worth Knowing
jsonpath for one value in a script, custom-columns for tables people read, and kubectl debug when the container has no shell. Includes the three quoting layers that break jsonpath.
KubernetesKubernetes Namespaces, ResourceQuotas, and LimitRanges
A namespace is only a boundary when quota and limit range make it one. Aggregate caps, per-pod defaults, the admission errors they produce, and namespaces stuck Terminating.
KubernetesKubernetes StatefulSets: Ordinal Identities, Headless Services, and PVC Lifecycle
Why each StatefulSet pod keeps a name, a DNS record, and its own PVC; how OrderedReady gates startup on readiness; and how partition-based updates canary a single quorum member.
KubernetesKubernetes securityContext, Capabilities, and Pod Security Standards
The five fields that remove most container escapes, which of them only exist at container level, and how the restricted profile enforces the same settings at admission.