How to Convert Config Files Between TOML, YAML, JSON, INI and .env
Convert configuration between TOML, YAML, JSON, INI, .properties, .env, plist and XML, and understand what changes with types, nesting, lists and comments.

How to Convert Config Files Between TOML, YAML, JSON, INI and .env
Every ecosystem picked its own configuration format. Rust and modern Python use TOML, Kubernetes and CI systems use YAML, JavaScript tools use JSON, Spring and older Java use .properties, PHP and Windows software use INI, containers read .env files, and Apple platforms use property lists. Sooner or later you need to move settings from one to another. The free Config File Converter reads nine formats and writes any of them, but a conversion is only correct if you know what each format can and cannot express.
The formats at a glance
- JSON: objects, arrays, strings, numbers, booleans and null. No comments.
- YAML: a superset of JSON with indentation-based structure, comments and anchors. Indentation mistakes change meaning.
- TOML: key = value pairs, [tables] and [[arrays of tables]], strongly typed, designed to be unambiguous.
- INI: [sections] with key = value. Everything is text; there is no standard for lists or nesting.
- Java .properties: flat key=value lines, often with dotted keys such as spring.datasource.url.
- .env: NAME=value lines read as environment variables. Always text.
- plist: Apple's XML format with dict, array, string, integer, real and boolean elements.
- XML: elements and attributes; the converter maps attributes to @name keys.
Types: text or numbers?
INI, .properties and .env store everything as text. When you convert port=8080 to YAML or JSON, should 8080 be the number 8080 or the string "8080"? Most programs reading YAML expect a number. Tick "typed values" to turn numbers and true or false into real types. Leave it off when values like 007 or a phone number must stay text.
Nesting: dots in keys
spring.datasource.url can be one key containing dots, or a path through nested objects. Spring Boot, Micronaut and many libraries treat dots as nesting, so converting application.properties to application.yaml with nesting on gives the structure those frameworks expect. Going the other way, nested structures become dotted keys in .properties and upper-case names joined with double underscores in .env, as in DATABASE__HOST, which is how .NET and many container images map environment variables to nested settings.
Lists
YAML, JSON and TOML have real lists. INI has only a common convention of key[] lines, and .properties and .env have none, so lists become comma-separated text. Check that the program reading the result splits them the way you expect.
Comments and formatting
Comments are lost in conversion, because the data structure has no place for them. Keep the original file for its comments, or add the important ones back by hand.
A worked example
A Spring Boot application.properties:
server.port=8080 spring.datasource.url=jdbc:postgresql://localhost:5432/app spring.datasource.username=app logging.level.root=INFO
Converted to YAML with typed values and nesting, it becomes a server block with port: 8080 as a number, a spring block containing datasource with url and username, and a logging block. The same data converted to .env gives SERVER__PORT=8080 and SPRING__DATASOURCE__URL and so on.
Errors with line numbers
If the input is not valid, the converter tells you which line failed: a duplicate key in TOML, a bad indent in YAML, a missing quote in .env. Fix it and the output appears.
Check the result
Paste the output back in with the input format on automatic. If it reads without errors and the value count matches, nothing was lost. Then test the file with the program that will read it.
Privacy
Configuration files often contain internal hostnames, user names and sometimes passwords. The converter runs entirely in your browser, so nothing is uploaded. Still, remove real secrets before sharing converted files with anyone.



