Data converters for moving between formats
Every system seems to speak a different format: the API returns JSON, the finance team wants Excel, the legacy integration expects XML, the deployment needs YAML and the database wants SQL. These data converters translate between them in both directions, keeping structure and types intact as far as the target format allows.
Popular conversions
- JSON ↔ CSV – JSON to CSV flattens arrays of objects into rows; CSV to JSON turns rows back into objects.
- JSON ↔ XML – XML to JSON and JSON to XML bridge modern APIs and older systems.
- JSON ↔ YAML – YAML to JSON shows exactly how a config file is parsed; JSON to YAML makes data readable.
- Spreadsheets – Excel to JSON and CSV to Excel connect code with the tools business users work in.
- Databases – CSV to SQL creates INSERT statements, and SQL converters turn dumps back into tables.
- Markup – Markdown to HTML, HTML to JSX, Pug and BBCode converters handle documents and templates.
- Images – converters such as PNG to JPG and the WebP converters change image formats in the browser.
- Code – cURL to Python and its PHP and JavaScript siblings turn API examples into working code.
What to expect when converting
Formats are not equally expressive, so some conversions involve choices:
- Hierarchy to table – JSON or XML with nested objects must be flattened for CSV, usually into dotted column names such as
address.city. - Attributes – XML attributes have no JSON equivalent and are mapped to specially prefixed keys.
- Types – CSV has no types, so numbers and booleans may come back as strings unless the converter detects them.
- Comments – JSON has no comments, so comments in YAML or XML are lost when converting to JSON.
A useful habit is to convert a small sample first, check the result, and only then convert the full file.
Choosing a target format
Pick the format the receiving side handles best: JSON for web APIs and JavaScript, YAML for configuration humans edit, XML for systems with schemas and namespaces, CSV or Excel for people working in spreadsheets, and SQL when data goes straight into a relational database. When several would work, prefer the one with the fewest conversion steps; every extra hop is a chance to lose types or structure.
Round trips
Converting A to B and back does not always return exactly the original: formatting, key order, comments and number formats may change. When the round trip matters, compare the result with the diff checker or a structural JSON or XML diff.
All conversions run in your browser, so spreadsheets, exports and API responses with personal data are not uploaded to a server.