Back to Tools

JSON Converter

Export JSON to XML, CSV, YAML, or Plain Text formats

0
Source JSON

Move JSON data into another format

JSON is the default for APIs, but plenty of tools still expect XML, a spreadsheet-friendly CSV or a YAML config. This converter reads your JSON in the browser and writes it out in whichever of four formats you choose. It is meant for quick, small conversions where you want to see the result immediately, not for schema-perfect production exports.

Converting a document

  1. Paste JSON into the Source JSON box. Sample loads a two-user array so you can experiment, and Clear empties the field. A line counter appears in the header.
  2. Pick the target with the four buttons: XML, CSV, YAML or Text. The main button label changes to match, and any previous result is hidden.
  3. Click Convert JSON to the chosen format.
  4. Use Copy, or Download to save a file named converted followed by the format, such as converted.csv or converted.yaml.

What each option produces

  • XML: an XML declaration and a root element named root. Object keys become element names, and array entries are wrapped in item elements.
  • CSV: one header row taken from the keys of the first object, then a row per object with values wrapped in quotes. Best suited to an array of flat objects.
  • YAML: indented key and value lines, with lists shown as dash items.
  • Text: the same data as readable JSON with four-space indentation, handy as a quick pretty print.

When to use it

  • Turning an API response into rows you can paste into a spreadsheet.
  • Creating a starter YAML file from a JSON config for a deployment tool.
  • Producing XML for a legacy system that cannot read JSON.
  • Making a quick readable copy of a payload for a ticket.

Know the limits

These converters are deliberately simple. XML element names come straight from your keys, so keys containing spaces or starting with numbers give invalid XML, and special characters in values are not escaped. In CSV, only keys from the first object become columns, so fields that appear only in later objects are lost, nested values are stored as JSON text, and values that are zero or false come out as empty quotes. YAML strings are written without quoting, which can be ambiguous for values like yes or numbers-as-text. Review the output before loading it into another system. Conversion runs in your browser, and invalid JSON produces an error pop-up instead.

Related Tools


Frequently Asked Questions

Which JSON shape works best for CSV?
An array of flat objects that share the same keys, such as a list of users. The header comes from the first object, so keys missing from it are dropped, and nested objects end up as JSON text inside a cell.
Why do zeros and false values appear empty in CSV?
The CSV routine treats falsy values as blank, so 0, false and null all appear as an empty quoted cell. If those distinctions matter, check the output and fix cells by hand, or convert booleans to strings first.
Is the XML output always valid?
Not always. Keys become element names as-is, so names with spaces or leading digits are invalid, and characters like ampersands in values are not escaped. It suits simple, clean data best.
What is the Text option for?
It outputs your data as pretty-printed JSON with four spaces of indentation. It is useful as a quick readable copy when you do not need a different format, though a dedicated JSON formatter has more options.
What file name does Download use?
The name is converted plus the current format as the extension, for example converted.xml, converted.csv, converted.yaml or converted.text. Rename the file after downloading if another extension suits your workflow.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.