Convert CSV rows to key=value pair strings for config files or logs
Convert CSV rows to key=value or key:value pair strings for config files, ENV files, or logs.
🛡️ Your rows never leave your browser.
Why Onfyt: Handles secrets correctly: values containing special characters are quoted; values containing quotes use appropriate escape sequences for shell safety.
Interactive Sample Data
| key | value |
|---|---|
| DB_HOST | localhost |
| DB_PORT | 5432 |
| DB_NAME | production |
How this tool works
Converting a CSV config table into an .env file format (KEY=VALUE per line) or a structured log string is a common DevOps task. Instead of manually reformatting rows in a text editor, DataFix produces the key=value output for any CSV schema.
For a two-column CSV (key, value), each row produces one KEY=VALUE line. For multi-column CSVs, each column name becomes a key and the cell value is the value, with all pairs on one line per row (log format) or each pair on its own line (env format).
Converting two-column CSV dictionaries into JSON or properties key-value mappings prepares configuration dictionaries and internationalization locale bundles.
Converting two-column spreadsheets into key-value configuration dictionaries exports clean JSON, YAML, or .properties bundles for internationalization locale files, application settings, and environment variables.
Exporting key-value records formats two-column datasets into lightweight key-value maps, enabling seamless generation of environment configuration files, lookup tables, and localization property bundles. Key-value serialization simplifies application configuration generation, producing deterministic key maps that integrate directly into microservice configuration registries. Structured key-value serialization accelerates environment setup and configuration synchronization across distributed microservices and server clusters.
Formatting tabular columns into key-value configuration dictionaries exports clean translation bundles and application settings. Deterministic key mapping simplifies environment configuration management. Duplicate key handling flags conflicting keys or automatically consolidates duplicate records into array lists for clean JSON schema output. Quoting options allow formatting JSON string keys and values with customizable indentation and spacing. Deterministic key mapping accelerates environment configuration synchronization across cloud microservice clusters.
Things that usually go wrong
- Duplicate keys overwrite each other — only the last row per key is kept.
- Non-string keys and values are converted to strings in the output.
Edge cases we tested
🧪 Value containing spaces ('New York')
Wrapped in double quotes: DB_CITY="New York".
🧪 Value containing = sign
Value quoted to prevent shell parsing errors.
Frequently Asked Questions
Can I output as a JSON object?
Yes — enable 'JSON output' to produce: {"key1": "value1", "key2": "value2"}.
Can I invert the mapping?
Swap the key and value column selections.
Related tools
Transform
Column to Comma-Separated List
Extract a CSV column and convert it to a comma-separated list for SQL IN clauses or code arrays.
Open Tool →
Transform
Comma-Separated List to Column
Convert a comma-separated, line-separated, or SQL IN list into a single-column CSV.
Open Tool →
Transform
Lines to CSV
Convert plain-text newline-delimited records into structured CSV tables.
Open Tool →