Back to All Tools

Data Converter

Convert between JSON, YAML, XML, TOML, and CSV. Everything is parsed and emitted in your browser.

Runs entirely in your browser — nothing is uploaded

About the Data Converter

Data Converter turns a document in one structured format into another: JSON, YAML, XML, TOML, or CSV, in any direction. If you have a YAML config someone needs as JSON, an API response you want as a CSV table, or a TOML file to hand off as XML, this reads the source, builds an in-memory object, then re-serializes it in the target format. You pick both sides yourself, so even a JSON-to-JSON reformat is a valid conversion.

You choose the source under the From tabs and the target under the To tabs, then paste your document into the Input box, which starts with a small JSON sample. Click Convert and the result appears in a read-only Output box. Parsing runs through a dedicated library per format: js-yaml for YAML, fast-xml-parser for XML, @iarna/toml for TOML, and PapaParse for CSV. If the input will not parse, a red error line shows the exact parser message instead of a result.

The tool is free, needs no account, and does every parse and serialize step in your browser tab. Nothing you paste is uploaded to a server, which matters when the document is a config file with hostnames or an export with customer rows. A Swap button flips From and To and feeds the last output back as input, Clear resets both boxes, and Copy grabs the output.

How to use the Data Converter

  1. 1Click the format you are starting from in the From tab row (JSON, YAML, XML, TOML, or CSV).
  2. 2Replace the sample text in the Input box with your own document.
  3. 3Click the format you want in the To tab row.
  4. 4Press Convert to parse the input and render the result in the Output box.
  5. 5Use the Copy button under the output, or Swap to send the output back as new input.
  6. 6Press Clear to empty both boxes and dismiss any error before starting over.

What you can use it for

YAML config to JSON

You have a docker-compose or CI file in YAML but a script that only reads JSON. Set From to YAML, paste the file, set To to JSON, and Convert. The output comes back indented two spaces, ready to save or feed into the script.

API response into a spreadsheet

An endpoint returns a JSON array of records and you need it in a spreadsheet. Convert JSON to CSV: each object becomes a row and the keys become the header line, so you can paste the result straight into Excel or Sheets.

Reading a TOML file

A Rust or Python project ships a TOML config and you want it in a shape you scan faster. Convert TOML to YAML or JSON to see the same keys and values laid out the way you are used to, without hand-translating the syntax.

Frequently asked questions

Does my data get uploaded when converting between formats?

No. Parsing and serializing both happen in your browser using libraries loaded into the page. Your input is never sent to a server, so config files, exports, and tokens stay on your machine. You can confirm this by disconnecting from the network after the page loads; conversions still work.

Can I convert anything into TOML?

Only if the data is a single top-level object. TOML cannot represent a bare array or a lone value at the root, so converting a JSON array or a CSV table (which parses to an array of rows) to TOML fails with the message 'TOML can only encode a top-level object'. Wrap the data in an object first, or pick another target.

How does CSV conversion handle the first row?

CSV input is parsed with the header option on, so the first row is treated as field names and every following row becomes an object keyed by those names. Empty lines are skipped. Going the other way, an object or array of objects is turned into CSV with a header row derived from the keys.

What happens to XML attributes?

Attributes are kept, not dropped. On the way in, each attribute is stored as a key prefixed with @_ (for example @_id), and on the way out any key with that prefix is written back as an attribute. That lets a round trip through XML preserve both element text and attribute values.

Why did I get a red error line?

The error is the raw message from the parser for the From format, which usually means the input is not valid in that format, or you left From set to the wrong one. Parsing loose CSV as JSON, or malformed YAML, will fail. Check that the From tab matches your actual input.