JSON, YAML, XML, CSV Converter
Paste JSON, YAML, XML or CSV and get the same data in another format right away. The input type is detected automatically and mistakes are pointed out.
- Paste or type your data
- Choose the output format and options
- Copy or download the result
Your files never leave your device
Converting between data formats
JSON, YAML, XML and CSV describe the same kind of data in different ways, and you often need to move from one to another. Paste your data, and the tool detects the input type, then shows the result in the output format you choose. If the input has an error, the message of the parser is shown instead of a result.
- CSV becomes a list of objects, using the first row as keys.
- XML attributes become keys starting with @, and repeated elements become lists.
- Nested data written to CSV is flattened with dotted keys such as address.city.
A worked example
A JSON object with the key name set to Ana and the key age set to 30 becomes two lines in YAML: name: Ana and age: 30. Choose indentation of 2 spaces or 4, or Minified for JSON in one line.
In XML, the element <person id="7"><name>Ana</name></person> is read as an object person with the key @id set to 7 and the key name set to Ana. The same convention is used when writing XML, so a round trip keeps the attribute.
Limits and tips
CSV is flat, so deeply nested data must be flattened and cannot always be restored exactly. For CSV input, choose the separator or leave it on automatic detection, and decide whether numbers and true or false should be detected rather than kept as text.
Keys stay in the order they appear in the input. Use the button to move the result into the input field when you want to convert it again. Very large texts depend on your browser's memory, and everything stays on your device.
Frequently asked questions
Is my data sent anywhere?
No. Conversion happens in your browser.
Does it keep the key order?
Yes. Keys stay in the order they appear in the input.
What happens with errors?
The error message of the parser is shown instead of a result, so you can fix the input.
Which delimiters work for CSV?
Comma, semicolon, tab and pipe are supported, with automatic detection and quoted fields.
Does it support XML attributes?
Yes. Attributes are written as keys starting with @ and text next to attributes as #text, and the same convention is used when writing XML.
Can I convert big files?
Yes, as long as the text fits in your browser memory, usually several megabytes.