Skip to content
migration.tools
.env to JSON

.env to JSON converter

Need your environment variables as JSON — for AWS ECS task definitions, Azure App Service settings, a Lambda configuration or a test fixture? Paste the .env file and get a flat JSON object.

.env

JSON

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your .env or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the JSON or download it. Drop several files to convert a batch into one ZIP.

Where JSON-shaped environment config is used

Many cloud services take settings as JSON rather than KEY=value lines: Azure App Service's bulk editor, AWS Secrets Manager, Lambda and ECS definitions, Firebase and Vercel project APIs.

All values are written as strings, which is what environment variables are. Comments are dropped, since JSON can't hold them.

Questions

What about duplicate keys?

The last value wins, as it would when the file is loaded, and the notes tell you how many duplicates were found.