Skip to content

Online data converters

Convert between JSON, CSV, XML, YAML and Markdown by pasting text or uploading a file.

Tools in this category

Converting between data formats isn't just changing syntax: CSV, JSON, XML and YAML represent information in different ways, and that structural difference is why some conversions lose nuance. This guide explains what each tool actually converts and what's worth checking afterward.

Tabular versus hierarchical data

CSV and TSV are tabular formats: flat rows and columns, with no native way to represent an object inside another object. JSON, XML and YAML are hierarchical: they allow nesting objects and lists inside other objects with no depth limit. That's why converting JSON to CSV only works cleanly when objects are flat (no field that is itself an object or a list); if a field holds a nested structure, that structure has no natural column in the resulting table, so it's worth reviewing the result before trusting it.

Convert JSON to CSV

Convert CSV to JSON

CSV, TSV and delimiters

The CSV to JSON converter treats the file's first row as a header (column names), not as another data row -- if your CSV has no header, the first real data row would be lost as if it were a column label. The engine follows standard CSV rules: quoted fields, commas inside a quoted field and line breaks inside a field are handled correctly, instead of breaking the table into extra columns. It also tries to automatically detect whether a value is a number or a boolean, so a text field that happens to look like a number (say, a postal code starting with 0) may get converted to a numeric type and lose that leading zero -- worth double-checking. TSV to CSV performs the same conversion, starting from a tab delimiter instead of a comma.

Convert TSV to CSV

JSON, XML and YAML

XML has two ways to hold information inside the same element: as text between tags, or as attributes inside the opening tag -- something JSON doesn't natively distinguish. The XML to JSON converter handles this by prefixing keys that came from an attribute with "@_", so the resulting JSON reflects that distinction instead of losing it, but it also means the JSON isn't "just XML": it depends on that specific convention. Malformed XML (unclosed tags, incorrect nesting) is detected before attempting the conversion and the exact error is shown, instead of producing an incomplete JSON. YAML to JSON uses a safe schema that only accepts the types that also exist in JSON -- it doesn't reconstruct custom YAML types or tags, so a YAML file relying on those advanced constructs won't convert as-is.

Convert XML to JSON

Convert JSON to XML

Convert YAML to JSON

Convert JSON to YAML

Converting versus validating

Converting one format to another isn't the same as validating that the original is correct: each converter does reject and point to a malformed file before attempting to transform it, but that's a side effect of the conversion process, not a dedicated validator checking business rules or a custom schema. An empty field ("") and a null value aren't the same across formats: an empty CSV cell doesn't automatically become null in the resulting JSON, it becomes an empty string, unless the whole cell value is empty and the engine treats it as such.

Markdown and HTML

Markdown to HTML renders the Markdown and sanitizes the resulting HTML before showing it, removing potentially dangerous code. HTML to Markdown does the reverse: it first sanitizes the input HTML and then converts it to Markdown with "# Heading"-style headings. Neither conversion guarantees recovering the exact original HTML or Markdown after a round trip: HTML supports more formatting nuance (inline styles, elements with no direct equivalent) than Markdown can always represent.

Convert Markdown to HTML

Convert HTML to Markdown

Privacy and what to check after converting

All 9 tools process the file or text in your browser: nothing is uploaded to a server. After any format conversion, it's worth checking: whether nested fields got lost going to CSV, whether data types (numbers, booleans) were detected as expected, whether XML attributes were preserved where they should be, and whether the result is still valid in the target format.

Frequently asked questions

Does converting JSON to CSV preserve nested structures?

Not natively. CSV is a flat tabular format; a JSON field containing an object or a list has no direct equivalent column, so it's worth checking how that field ended up represented in the resulting CSV.

Are an XML file's attributes lost when converting to JSON?

No. The converter keeps them by prefixing the corresponding JSON key with "@_", to distinguish them from the element's text content.

Does a CSV without a header row convert correctly to JSON?

Not as you'd expect: the converter treats the first row as the column header, so if your CSV has no header, the first real data row would mistakenly be read as column names.

Does YAML to JSON support any YAML construct?

No. It uses a safe schema that only recognizes the types that also exist in JSON (string, number, boolean, null, lists, maps), with no custom YAML types or tags.

Does an empty CSV value become null in JSON?

Not automatically. An empty cell becomes an empty text string, not a null value; they're different concepts and shouldn't be treated as interchangeable.

Can I trust HTML to Markdown and Markdown to HTML as exact inverse operations?

Not always. HTML supports formatting nuance that Markdown doesn't directly represent, so a round trip between the two formats may not reproduce the original in full detail.