JSONL ↔ YAML Converter
100% client-side. No upload.
Convert
JSONL ↔ YAML Converter
Convert a stream of JSON Lines into a multi-document YAML stream (each record separated by ---), or take a multi-doc YAML file and emit one JSON record per line. Useful for prepping Kubernetes manifests from records, viewing JSONL in a friendlier human format, or moving config between systems. 100% in-browser.
How it works
JSONL → YAML parses each line as JSON, emits it as a YAML document, and
separates documents with the standard --- marker. Strings that don't contain
YAML-special characters stay unquoted; everything else is quoted with double quotes to
guarantee round-trip safety. Numbers, booleans, and null map directly.
YAML → JSONL splits the input on --- document boundaries,
parses each as a JSON-compatible YAML subset (objects, arrays, strings, numbers, booleans,
null), and emits one JSON object per line. Anchors, aliases, and tags aren't supported —
for those, run through a full YAML library first.
Tips & common pitfalls
- YAML strings with colons need quotes. The emitter does this automatically, but if you're hand-writing YAML to feed back, watch for
key: foo: bar— wrap the value in quotes. - Indent matters in YAML. Pick 2 or 4 and stick with it. The emitter defaults to 2.
- Numbers stay numbers.
"007"stays as the string"007", not the number 7. - YAML can be ambiguous. The string
yesis interpreted as the booleantrueby some YAML 1.1 parsers; we follow JSON-friendly 1.2 semantics —yesstays a string.
Example
Input JSONL:
{"name":"prod-api","replicas":3,"image":"acme/api:1.2"}
{"name":"prod-worker","replicas":2,"image":"acme/worker:1.2"}
Output YAML:
name: prod-api
replicas: 3
image: acme/api:1.2
---
name: prod-worker
replicas: 2
image: acme/worker:1.2