Convert ENV to TOML
Turn ENV files into TOML. The same keys and values as TOML, with plain values written before tables, and a top-level list is written under the key items, as [[items]] tables when its entries are objects.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop ENV files on the dialor turn it to pick what to do
Your .env as a TOML file.The same keys and values, written as TOML in one file.
What you get
A TOML file with the keys and values from your ENV file. Plain values are written first, and tables come after them, as TOML requires.
A list at the top level is written under the key items. When its entries are objects, each one becomes an [[items]] table.
What it drops or refuses
TOML cannot hold a null, so the two cases differ. A null in an object is dropped, and the conversion finishes with a warning. A null inside a list stops the conversion.
An integer beyond the signed 64-bit range also stops the conversion, since TOML cannot store it.
Going back
To turn a TOML file into an ENV file, use TOML to ENV. For other targets, see every ENV conversion.
ENV and TOML.What each format is.
The formats
Dotenv
KEY=value lines that hold environment variables for an app.
- Extensions
- .env
- MIME type
- text
/x -env - Kind
- Text and data
TOML
TOML configuration files, the format of Cargo and pyproject.
- Extensions
- .toml
- MIME type
- application
/toml - Kind
- Text and data
In your code.The same ENV to TOML conversion through the API, for your app or your agent.
$ cv convert report.env report.toml$ cv convert report.env report.tomlQuestions.What people ask about ENV to TOML.
Yes. The same keys and values are written to the TOML file. The exceptions are a null in an object, which is dropped, and the cases that fail.
It goes under the key items. If its entries are objects, they are written as [[items]] tables.
Either a list contains a null, or an integer is beyond the signed 64-bit range. TOML can hold neither.
A null in an object is dropped, and you get a warning. A null inside a list makes the conversion fail.