.env to JSON converter
To convert .env to JSON, drop your .env file in the box below. It converts straight away; press Download to save the JSON. It all happens in your browser, so your file stays on your device.
Convert to
Converted on this device, never uploaded
What changes
| .env to JSON | What happens |
|---|---|
| Rules | As dotenv reads them: export, quotes, escapes in double quotes, multi-line values, # comments |
| ${VAR} | Kept as written, never filled in |
| Set twice | The last value counts, and the note names the key |
| Lines that are not KEY=value | Left out, named by line in the note |
How to convert .env to JSON
- Add your .env. Drop the file in the box, or click to choose it. It becomes JSON straight away.
- Check the result. Look at the preview and the size. The defaults are right for most files.
- Download. Press Download to save the JSON.
Why JSON
See every variable in a .env file as one JSON object, for a deployment tool, a secrets store or a check.
Questions
It is converted in your browser and never uploaded. The JSON has the same secrets as the .env, so keep it as private.
Every value is text unless “Numbers and true/false as values” is on: then PORT=3000 becomes 3000.
No. The conversion happens right in your browser, so your file stays on your device. There is no account to make, either.