YAML to JSON Converter: JSON to YAML & Validator
Pricing
from $0.42 / 1,000 converted documents
YAML to JSON Converter: JSON to YAML & Validator
Convert YAML to JSON and JSON to YAML from pasted text, file URLs or key-value store records. Syntax errors are reported with line and column. Multi-document YAML, YAML lists to CSV, safe loading only. Empty input = free demo.
Pricing
from $0.42 / 1,000 converted documents
Rating
0.0
(0)
Developer
Actor Factory
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Features
Share
YAML to JSON converter (and JSON to YAML): paste text or give file links, get the converted text in the results plus a downloadable file — with syntax errors reported by line and column.
Paste YAML or JSON, or list .yaml, .yml, .json or .jsonl file URLs (or records in a key-value store), press Start, and every document comes back converted. YAML with several documents (---), anchors and aliases (&defaults, <<: *defaults), dates and comments is handled; broken input gives a free error row that says exactly where the problem is. YAML is only ever read with the safe loader, so a file can never run code. You pay per converted document — no monthly rent.
Try it free: clear the input and press Start — a built-in sample config is converted to sample-config.json (not charged; rows carry _demo: true).
What you get
Input (YAML):
app:name: shop-apiport: 8080allowed_origins:- https://example.com
Result row:
| status | source | document | direction | topLevelType | file | output |
|---|---|---|---|---|---|---|
| ok | inline text | 1 | yaml-to-json | object | inline.json | {"app": {"name": "shop-api", "port": 8080, "allowed_origins": ["https://example.com"]}} |
A syntax error instead gives:
| status | source | error | line | column |
|---|---|---|---|---|
| error | https://example.com/deploy.yaml | Invalid YAML: while parsing a flow sequence expected ',' or ']', but got ':' | 3 | 2 |
- One result row per document: converted text (first 100,000 characters), top-level type and size, file name and download link.
- One output file per input in the run's key-value store (
.json,.jsonl,.yamlor.csv) with a signed download link. - Error rows for invalid YAML or JSON, with the 1-based line and column and the document number — free.
How to use
- YAML or JSON text — paste it. And/or file URLs to public
.yaml,.yml,.json,.jsonlor.ndjsonfiles. And/or a key-value store with files as records. - Conversion —
auto(default: YAML becomes JSON, JSON becomes YAML, decided by the file extension and then the content), or forceyaml-to-json,json-to-yamloryaml-to-csv. - Optional: JSON indent (0 = minified), YAML indent, Sort keys, how several YAML documents become JSON (one array or JSON Lines), Formula-safe CSV, whether to save files and to put the converted text in the results.
{"fileUrls": ["https://example.com/k8s/deployment.yaml", "https://example.com/api/openapi.json"],"mode": "auto","jsonIndent": 2}
Output details
- YAML → JSON: dates and timestamps become ISO text (
2026-03-02,2026-03-02T10:15:00+00:00),!!binarybecomes base64 text, sets become arrays, non-text keys become text (1:→"1"),.nanand.infbecomenull(JSON has no NaN; a note says so). Anchors and merge keys are expanded. - YAML 1.1 booleans: like most YAML tools (PyYAML), unquoted
yes,no,on,offare read as true/false — also as keys (on:→"true"). Quote them ("on":) to keep them as text. - JSON → YAML: key order is kept (unless Sort keys), Unicode is written as is, long strings are not wrapped. JSON Lines files (
.jsonl) become multi-document YAML separated by---. - Auto with text that starts with
{or[: it is treated as JSON, so a broken JSON gets a JSON error with its line and column. For YAML flow style like{a: 1}that is not JSON, chooseyaml-to-json. - Duplicate keys are allowed by YAML parsers (the last value wins); the Actor lists them in notes so you can fix them.
- YAML → CSV: a document that is a list of objects (or an object holding exactly one such list, like
items:) becomes rows; columns are the union of keys in first-seen order; nested values are written as JSON text. All documents of one input go into one CSV. - Safety: only standard YAML tags are read (safe loader). Python or custom tags such as
!!python/objectare refused with an error row. Inputs whose aliases would expand to more than 2,000,000 values (a "billion laughs" file) are refused.
Limits (cannot be raised by input)
- 100 inputs per run, each up to 10 MB of UTF-8 (or UTF-16 with BOM) text, up to 10,000 documents per input, output file up to 50 MB.
- Public files only, no login. Links to internal network addresses are blocked.
Pricing
Pay per event: $0.0006 per converted document ($0.60 per 1,000). A YAML file with 3 documents costs $0.0018. Syntax errors, failed downloads, inputs over a limit and the demo are free. Store discounts apply automatically: BRONZE −10%, SILVER −20%, GOLD −30%. If the maximum charge you set for the run is lower than the number of documents in an input, that input gets a free error row instead.
FAQ
Can I use it as a YAML validator? Yes. Valid documents come back converted; invalid ones get an error row with the line, column and message, and are not charged.
Does it keep comments? No. Comments are not part of the YAML data model, so they are dropped when converting to JSON (and JSON has no comments).
Kubernetes, Docker Compose, GitHub Actions, OpenAPI files? Yes — they are plain YAML or JSON. Multi-document Kubernetes manifests become one JSON array (or JSON Lines).
Can I call it from code? Yes, through the Apify API: send {"text": "..."} and read the output field of the result rows.
If this Actor saved you time, a rating on the Store helps others find it.
More tools from the same developer
- JSON to CSV Converter — turn nested JSON files or datasets into one flat CSV file
- Flatten JSON to CSV — flatten nested JSON into flat rows with the separator you choose
- Excel to JSON — turn Excel (XLSX) sheets into JSON rows, or a JSON file into an Excel sheet
- CSV to Excel Converter — convert CSV, TSV, Excel XLSX, JSON and NDJSON files or Apify datasets into each other
- Merge Datasets — combine several datasets or CSV/JSON files into one, with columns aligned