Data Converter
Convert JSON, XML, YAML, CSV, HTML, Dart, PDF and plain text in any direction.
Supported conversions
Pick any input format on the left and any output format on the right - every pair works, for example JSON to XML, XML to JSON, CSV to JSON, JSON to YAML, YAML to CSV, JSON to Dart model classes or JSON to a downloadable PDF.
- Read from: JSON, XML, YAML, CSV, HTML tables and plain text.
- Write to: JSON, XML, YAML, CSV, HTML, Dart, plain text and PDF.
- Formatting: pretty or minified output, 2 / 4 / 8 space or tab indentation, CSV delimiter and header control, XML root name and Dart class name.
- Errors: invalid input is reported in red with the exact line and column, plus the offending line highlighted.
Everything runs in your browser - your data is never uploaded.
Working with documents instead? The File Converter handles PDF, Word and Excel files.
Worked example: JSON to XML
Leave From on JSON and To on XML, keep the output style on Pretty with a 2-space indent, and leave the XML root name as root. Paste this into the input pane:
{
"id": 101,
"name": "Test Data",
"skills": ["Flutter", "JavaScript"]
}
Press Convert and the output pane shows:
<?xml version="1.0" encoding="UTF-8"?> <root> <id>101</id> <name>Test Data</name> <skills>Flutter</skills> <skills>JavaScript</skills> </root>
Notice what happened to skills. XML has no array type, so the two entries became two <skills> elements side by side. Press the swap button and convert that XML straight back to JSON and the array returns intact.
The same round trip works for the other formats. YAML keeps the nesting as indentation, CSV flattens the structure into rows and columns, and Dart turns the shape into model classes.
Frequently asked questions
Is my data uploaded when I convert it?
No. Parsing and serialising both happen in your browser, so the data you paste never leaves your device and is not stored or logged anywhere.
Why did my JSON array turn into repeated XML tags?
XML has no array type. Each item is written as another element with the same tag name, which is the conventional XML representation. Converting that XML back to JSON produces the array again.
What happens if my input is not valid?
The converter stops and shows a red error naming the exact line and column where parsing failed, along with the offending line itself, so you can jump straight to the problem instead of hunting for it.
Can I convert CSV files that use semicolons or tabs?
Yes. The formatting options include a CSV delimiter setting for comma, semicolon, tab or pipe, and a checkbox for whether the first row is a header row. The same setting applies when writing CSV out.
What does converting JSON to Dart produce?
It generates Dart model classes that mirror the structure of your JSON, using the class name you supply as the name of the top-level class and deriving nested class names from the keys.