JSON to YAML converter
The result appears here.
Convert
Your document never leaves the browser.
Convert JSON to and from YAML, XML and CSV — in your browser, never uploaded.
Pick a pair, paste or drop a document, and the result is written as you type. Any format the page can read converts to any other it can write, by way of JSON, the format the rest of the site edits, compares and queries.
From reads JSON, YAML, XML, CSV and TSV. To writes all five, a GitHub-flavoured Markdown table, and SQL for PostgreSQL, MySQL or SQLite, and any From goes with any other To. Types and classes in ten languages are made on Generate, the workspace beside this one.
When neither side is JSON, as in YAML to XML or CSV to SQL, the page reads the source to JSON first and writes the result from that JSON. The row shows the step as → JSON →, and the result card gains a JSON tab beside the result, so the intermediate document can be read, copied, downloaded or opened in the editor. When the writing half refuses (a table from a document with no rows, say), the message points at the JSON step rather than at your source.
Paste a whole document, open a file or drop one on the source, and the page works out what it is: CSV pasted while the pair is JSON to SQL makes it CSV to SQL, and the page says so. To only moves when it would equal From. The options for the pair sit between the two panes and apply as you change them, under headings such as Read CSV and Write SQL when a pair needs both.
Press ⇄ to turn a pair around whenever its result can be read back: YAML to XML becomes XML to YAML, with the XML as the new source. A Markdown table or SQL is never read back, so those pairs stay one way.
YAML, with the pair set to YAML to XML
order:
id: 7
item:
- pen
- inkThe JSON tab, the step between the two
{
"order": {
"id": 7,
"item": [
"pen",
"ink"
]
}
}The XML, written from that JSON
<?xml version="1.0" encoding="UTF-8"?>
<order>
<id>7</id>
<item>pen</item>
<item>ink</item>
</order>Nothing here is a second implementation. A YAML file converted on this page and the same file opened in the editor give the same JSON, byte for byte, with the same notices. Numbers are copied as written, so a 20-digit identifier keeps every digit in both directions, and a conversion that cannot be done says where — the line and the column — instead of guessing.
When a conversion loses something, the result says what: comments not carried into JSON, anchors expanded, sibling order changed. Those sentences are the engine’s own.
YAML holding a 20-digit number
id: 12345678901234567890
name: AdaThe JSON from YAML to JSON, every digit kept
{
"id": 12345678901234567890,
"name": "Ada"
}Convert in the header carries the document you were editing across, and Open JSON in Editor carries the JSON side of a conversion back, or the JSON step when neither side is JSON. The editor asks before it replaces a document, and one undo puts the old one back.
The conversion runs in your browser, in the same engine the editor uses. The document is never uploaded, never logged and never leaves your machine — there is no server to send it to. Once the page has loaded it keeps working with the connection off.
YAML to JSON, JSON to YAML, XML to JSON, JSON to XML, CSV to JSON, JSON to CSV, JSON to TSV, JSON to a Markdown table and JSON to SQL. Every other pair works here too — choose it with From and To.
No fixed one. Large documents convert after a short "Converting…", and a document over 10 MB waits for you to press Convert, so a paste never freezes the page.
For this tab, yes: a reload brings the source back. A new tab starts empty, and nothing is kept once the tab is closed.