Chris Collins

Tools · data

Data converter

Convert between JSON, YAML, CSV/TSV, XML, TOML, and query strings, and generate TypeScript, JSON Schema, Go, Rust, and Python types from JSON.

Added · updated 28 October 2026

Works with

How to use it

Choose the input and output formats, paste or open a file, and the conversion runs as you type. Detect guesses the input format; Swap turns the output into the new input.

  • CSV/TSV — the delimiter is detected (comma, semicolon, tab, or pipe); quoted fields, embedded newlines and doubled quotes are handled. Numbers and booleans are detected (values with leading zeros stay text). Columns named a.b become nested objects, and nested objects are flattened back to dotted columns on the way out.

  • XML — attributes become @name keys (the prefix is configurable), repeated elements become arrays, and mixed text becomes #text.

  • Query strings — bracket notation (filter[size][]=small) becomes nested objects and arrays; a full URL can be pasted.

  • TOML — tables, arrays of tables, inline tables, dotted keys, and all string forms. Dates are kept as strings.

  • Code generation — types are inferred from every element of every array, so fields that are missing somewhere become optional and null makes a field nullable. Strings that look like dates, e-mail addresses, URIs, or UUIDs get a JSON Schema format. More type options… sends the input, as JSON, to JSON → types — Zod, Java, Kotlin and protobuf too, enums, tagged unions and naming settings.

YAML uses the js-yaml library, loaded on first use.

Sharing

Share link copies a URL that opens this tool exactly as configured. ?from=, ?to=, and ?text=; options you changed and longer input go into ?s=. For example: convert/?from=csv&to=json&text=a%2Cb%0A1%2C2.

Related: data wrangler — clean and reshape tables with a replayable recipe of steps (trim, retype, split, cluster, join, pivot), exported as SQL or pandas.

Runs entirely in your browser; nothing you type leaves this page.