Convert between JSON, YAML, XML, CSV, TSV and URL query strings in any direction, with results as you type and errors pinpointed to the line
JSON, YAML, XML, CSV, TSV and query strings convert into each other, so you do not need a separate tool for every pair
The result refreshes as you type or paste, with no convert button — useful when you are reshaping a deeply nested structure
JSON syntax errors report the exact line and column, and YAML errors name the offending line, which beats a bare SyntaxError
Indent with two spaces, four spaces or minify completely, and sort keys recursively so two configs diff cleanly
An @ prefix marks attributes and #text holds text nodes, so converting to XML and back does not silently drop attributes
Parsing and serialisation are entirely local, so configuration files containing keys or credentials are safe to paste in
The two dropdowns say what you have and what you want. Choosing the wrong source format fails immediately, which is itself a quick validation. The target defaults to YAML; switch it back to JSON when you need to minify.
Drop your data into the left box and the right box updates live. Press "Load sample" to get a sample that matches the current source format.
Indentation controls whether the output is pretty or minified. The XML root name only matters when the source has no single top-level key. For CSV, check the delimiter and the header row.
Press "Swap formats and content" to feed the result back in as input. If the two directions agree, nothing was lost — the fastest way to check nesting and attributes survived.
Turn an API response into a YAML config in one paste instead of deleting braces by hand
Convert an array of records to CSV and open it in Excel for analysis
An older endpoint that only speaks XML: convert the JSON body, attributes preserved via the @ prefix
Paste a URL query string to see the structure, with repeated keys merged into arrays
Turn on key sorting and give both files the same indentation to strip out ordering noise
Minified JSON hides the position of the mistake; this tool reports the exact line and column
JSON has only six types: object, array, string, number, boolean and null. There is no date, no integer-versus-float distinction and no undefined — languages map these after parsing. Numbers are IEEE 754 doubles, so integers above 2^53 (a 19-digit snowflake ID, for instance) lose precision on parse; the correct fix is for the server to return them as strings. JSON also forbids trailing commas, single quotes and comments, and those three account for most hand-written JSON errors.
YAML expresses hierarchy with indentation: keys at the same level must align, and indentation must use spaces, never tabs. Its other distinguishing feature is implicit typing — true, false, null and ~ are recognised as booleans and null, and a purely numeric string needs quotes to stay a string. YAML 1.1 even treated yes, no, on and off as booleans, so the country code NO (Norway) parsed as false — the famous "Norway problem". This tool follows the YAML 1.2 core schema and recognises only true, false, null and ~, avoiding that ambiguity.
An XML element can simultaneously carry attributes, text content and child elements, which is what makes it more complex than JSON. Attributes suit identifiers and metadata (id, type, unit), text suits the value itself, and child elements suit structure. XML has no array syntax: lists are expressed by repeating a child element, so a JSON conversion has to merge same-named siblings into an array. In the other direction each array element becomes a same-named child, and both directions must agree or the data will quietly change shape.
Strictly speaking CSV has no standard, only RFC 4180 as a de facto reference. The delimiter may be a comma, a semicolon or a tab (the last being TSV), and quoting rules, line endings and encoding all vary. Excel on Chinese Windows saves CSV as GBK by default, which turns into mojibake when read as UTF-8 — the most common trap of all. Another is leading zeros: a postcode of 007 becomes 7 if treated as a number, so this tool only infers a number when there is no leading zero and keeps everything else as a string.
A URL query string is fundamentally text pairs of key and value with no type information, so the 1 in a=1 is a string and so is the true in a=true. Bracket notation (a[b]=1, a[]=1) is not part of any standard; it is a convention popularised by PHP, Rails and Express to express nested objects and arrays. Frameworks also disagree on duplicate keys — some take the last, some the first, some merge into an array. These differences are a classic cause of "works locally, wrong in production".
| Construct | JSON | YAML | XML |
|---|---|---|---|
| Object | { } | key: value | Child elements |
| Array | [ ] | - item | Repeated elements |
| Attribute | "@key" | Ordinary key | key="value" |
| Text | "#text" | Ordinary key | Element content |
| Null | null | null or ~ | Self-closing tag |
| Comment | Not supported | # comment | <!-- --> |