.env ↔ JSON Converter

Convert environment files to a JSON object and back.

How it works

Turn a .env file into a JSON object for scripts and configs, or generate .env lines from JSON. Comments and quoted values in .env files are handled automatically.

Example: PORT=8080 becomes { "PORT": "8080" }, comments ignored.

Input
Output