Ten Formats: Asymmetric Capability, Known Losses

Open Tool Text Format Converter

Model first, syntax second

Common data formats differ at the model level: some nest arbitrarily, some hold only key-value pairs, some are flat rows. JSON, XML and YAML express nesting; INI and properties files carry sections and keys without arrays; CSV and TSV are flat tables; TOML supports sections and arrays but not deep nesting; SQL is a statement sequence requiring table and column definitions. Conversion maps one model onto another, and asymmetric capability always loses something. The tool converts any pair of these ten, with control over indentation, delimiter and root name.

Steps

  1. Paste the source and pick source and target formats.
  2. Set indentation to two spaces, four, or a tab.
  3. Set the delimiter to comma or semicolon when crossing CSV and TSV.
  4. Name the root element for XML or the table for SQL, defaulting to root.
  5. Run it, confirm the output parses, then download the result.
  6. Reset for the next file.

Nesting, arrays, types

Nesting downgrade is the usual loss: multi-level JSON into INI leaves child objects as sections with nowhere for deeper levels. Arrays differ by format, needing numbered keys in INI, native support in TOML and a single cell in CSV. Types go too, since properties values are all strings and booleans and numbers need reading back. Delimiter conflicts require escaping, as a comma inside a comma-separated cell breaks the row without quotes. The root name fixes XML's top level, and a wrong one leaves parsers no entry point. Generated SQL needs identifier-safe names, quoting anything with spaces or non-ASCII characters.

Common mistakes

Assuming nested data into INI is lossless when it flattens. Expecting numbers after CSV to JSON, which yields strings. Duplicate keys in INI silently overwriting. A wrong XML root breaking parsing. Unquoted table names with spaces failing to execute. And unescaped delimiters inside values shifting columns.

Where conversion promises nothing

Asymmetric conversions must declare their losses rather than claim fidelity. Config migration is especially risky, needing a test run and item-by-item comparison. Production data changes start from a backup with the original kept. Circular references and extreme nesting exceed generic converters. And overwriting live configuration with converted output is always wrong.

⏫︎