Search and jump to any tool. Type to filter; use arrow keys to move and Enter to select.
Converts a .env file into a JSON object and turns a JSON object back into .env lines.
Converts a .env file into a JSON object and turns a JSON object back into .env lines. The parser understands comments, an optional export prefix, quoted values that span several lines and empty assignments. Use it to move configuration between dotenv files, hosting dashboards and deployment tools that want JSON.
# db export DB_HOST=localhost # local PORT=5432 GREETING="Hi\tthere" RAW='a $b' EMPTY=
{
"DB_HOST": "localhost",
"PORT": "5432",
"GREETING": "Hi\tthere",
"RAW": "a $b",
"EMPTY": ""
}Good to know. Variable expansion is not performed: a reference such as $HOME stays literal text. With Quoting set to never, newlines in values are written as backslash-n so the file stays valid, but spaces and hash signs are not protected.
.env file to JSON, or turn a JSON object back into .env format. Everything runs in your browser.