Skip to content

JSON, CSV and XML converter

Paste your data and choose the target format. It converts between JSON, CSV and XML, flattens nested fields, infers types, and tells you the line and column of an error in broken input. Nothing is sent to a server.

Free tool · Integration

Paste JSON (array or object), CSV (separated by ; , tab or |) or XML. Up to 5 million characters.

Load example:

The conversion runs in your browser; the data you paste is not sent anywhere.

Output

The output appears here.

Options

Conversion rules
  • Nested fields flatten to a dot path: {"a":{"b":1},"c":[{"d":2}]} → columns a.b and c.0.d. With flattening off, a nested value is written into the cell as JSON text. From CSV to JSON/XML, a.b headers are expanded into nesting.
  • An object with a single key whose value is an array ({"data":[…]}) is treated as a wrapper; the records are the array's items. Empty arrays and objects produce no column.
  • In XML, attributes become @name and element text becomes the #text key; siblings with the same name become an array. If a single element name repeats at least twice under the root, the root is dropped. A one-item array does not come back as an array after going to XML and back.
  • With type inference on, numbers, true/false and empty values (null) are recognised; values with a leading zero (007) and integers longer than 15 digits stay text. In CSV output numbers are written with a decimal point.
  • CSV follows RFC 4180: quotes, line breaks inside quotes and the "" escape. Values are quoted when they contain the separator, a quote or a line break, or have leading/trailing spaces.
  • The error report gives line and column starting at 1. DOCTYPE is skipped and XML entities are not expanded; only the five standard entities and numeric character references are decoded.

This tool carries structure, not meaning: verify the field mapping, mandatory fields, date and currency formats and the character encoding separately in a live integration. Be careful when copying the output into places where you share confidential data.

Let us design the data flows, mapping and error handling between your ERP, CRM and field systems together.

Request a call

01

How to use

  1. A

    Paste the input or load an example; the input format is detected automatically, or you can pick it by hand.

  2. B

    Choose the output format and, if needed, adjust the separator, header, flattening, type inference and indentation options.

  3. C

    Copy the output or download it as a file; if there is an error, look at the line and column and fix the input.

02

How the three formats differ

JSON carries nested objects and arrays naturally and knows types (number, text, boolean, null). CSV is a flat table: each line is a record, each column a field; it has no types, every value is text. XML is hierarchical, distinguishes attributes from text, and everything is text.

This difference can make a conversion lossy: reducing nested data to CSV means flattening field names with a dot path such as "customer.address.city"; coming back from CSV without type inference every value stays text. The tool's options make these decisions explicit.

03

Flattening and type inference

Flattening turns nested paths into a single header: address.city, tags.0, tags.1. Array items are named by their index. If records carry different fields, the columns are produced as a union and missing fields stay empty. If your headers contain dots (for example "v1.2"), expanding them back into nesting can give unexpected results; turn flattening off.

Type inference guesses the value in CSV and XML input: 12 becomes a number, true a boolean, an empty cell null. Values with a leading zero such as postal codes, phone numbers and product codes are preserved (007 stays text), but identifiers that look like scientific notation, such as "1E5", may turn into numbers; turn type inference off for such fields.

04

Error location and strict parsing

The JSON parser is strict: comments, single quotes, trailing commas and unquoted keys are not accepted, so the output is in a form other systems can read too. Errors are reported with line and column; the most frequent causes are a trailing comma, a missing closing bracket and an unescaped quote.

For XML, matching tags, quoted attributes and a single root element are checked. The characters & and < in text must be written as &amp; and &lt;. For security, DOCTYPE and external entities are not processed.

FAQ

Turkish characters look broken in the output, what should I do?
The tool processes text as UTF-8 and does not change characters; the corruption usually comes from the program that opens the file. In Excel import the CSV with "Data → From Text/CSV" and choose UTF-8. The XML declaration is written as UTF-8.
Why does a CSV open in a single column in Excel with Turkish or German settings?
Excel with a Turkish or German locale expects a semicolon as the list separator. Set the output separator to semicolon. Because numbers are written with a decimal point, Excel may treat them as text; if needed choose the point as the decimal separator in the import wizard.
How do I convert nested JSON to CSV?
With flattening on, nested fields are expanded into columns by dot path (address.city, tags.0). With it off, the record's top-level fields become columns and nested values are written into the cell as JSON text.
How do XML attributes appear in JSON?
With an @ prefix: the element <customer id="7"> becomes "@id": 7. If an element has both an attribute and text, the text goes to the "#text" key. When converting from JSON to XML, keys starting with @ are written as attributes.
Why did my large numbers change?
JSON parsing turns numbers into 64-bit floating-point values; integers longer than 15 digits (for example 20-digit identifiers) cannot be stored exactly. The tool reports this with a warning. Make identifier fields quoted strings at the source.
Is there a file size limit?
The input can be at most 5 million characters, and in CSV/JSON at most 200,000 records and 5,000 columns. Because the conversion runs in the browser, the tab may slow down with very large files; a script or an ETL tool is better suited to those.

Set up the data flow between your systems

Let us design the data flows, mapping and error handling between your ERP, CRM and field systems together.