Skip to main content

CSV to TOML Converter

Convert CSV data to TOML configuration format

Convert CSV data into TOML, the configuration format used by Rust’s Cargo, Python packaging, Hugo, and a growing number of tools that wanted something less error-prone than YAML.

Each CSV row becomes an entry in a TOML array of tables — the double-bracketed section header that repeats for every record — with your column headers as keys. That is the idiomatic way to express a list of records in TOML.

Column headers are sanitised into valid bare keys, since TOML only allows letters, digits, underscores, and dashes unquoted. Values are quoted so that text containing spaces, equals signs, or brackets is not misread as syntax.

Files stay on this deviceRuns entirely in your browserFree — no signup

Drop your file here or browse from your device

Accepts CSV, TSV, TXT. Maximum input: 10 MiB. Files above this hard limit are rejected before local processing.

How to Convert

  1. Upload your CSV file or paste CSV data
  2. Review the generated TOML
  3. Copy the output or download the .toml file
  4. Paste it into your configuration file

Features

  • Array-of-tables output, the idiomatic TOML shape for a list of records
  • Sanitises column headers into valid TOML bare keys
  • Falls back to positional key names for blank headers
  • Quotes and escapes values so text is not misread as syntax
  • Copy the output or download a .toml file
  • Runs entirely in your browser — no upload

Use Cases

  • Generate configuration entries from a table maintained in a spreadsheet
  • Create TOML fixtures or seed data for tests
  • Build static site data files for Hugo or a similar generator
  • Convert a reference table into an application config section
  • Move settings from a spreadsheet into a TOML-based tool

Frequently Asked Questions

What does the TOML output look like?

An array of tables: a repeated double-bracketed section header for each row, followed by key-value pairs taken from your column headers and cell values.

Why an array of tables rather than nested keys?

Because a CSV is a list of records, and the array-of-tables form is how TOML idiomatically expresses a repeated list of structured entries.

What happens to column headers that are not valid keys?

They are sanitised into valid bare keys, since TOML only permits letters, digits, underscores, and dashes unquoted. Blank headers get a positional name so no column is lost.

Are all values written as strings?

Values are quoted, which keeps them as strings. TOML is strictly typed, so if a field needs to be a number, a boolean, or a date, remove the quotes on that key after generating the file.

What is TOML used for?

Configuration. Rust’s Cargo, Python packaging via pyproject.toml, and Hugo all use it, chosen for being more explicit and less ambiguous than YAML.

Is my data uploaded?

No. The conversion runs in your browser and the file contents are not sent to the app server.