Convert the contents of a .env (dotenv) file into a clean JSON object. Environment files store configuration as simple KEY=VALUE lines, and sometimes you need that same data as JSON, for example to feed a config loader, seed a secrets manager or document the variables an app expects. This tool parses each line, skips blank lines and full-line comments starting with a hash, splits on the first equals sign so values containing equals signs stay intact, and strips matching surrounding quotes from values. The result is pretty-printed JSON you can copy straight away. Paste your dotenv text, click convert, and read the object. Everything is parsed locally in your browser, so the secrets in your env file are never uploaded or stored anywhere.
It reads dotenv style KEY=VALUE lines, the format used in .env files, and turns them into a JSON object.
Lines starting with a hash and blank lines are ignored, so only real key-value pairs end up in the JSON.
You get a pretty-printed JSON object where each env key becomes a property with its string value.
Convert the contents of a . env (dotenv) file into a clean JSON object.
Yes. .env to JSON is completely free, with no sign-up and no usage limits.
Yes. .env to JSON runs in any modern web browser. There is nothing to download or install.
Yes. .env to JSON runs entirely on your device in your browser, so nothing you enter is uploaded to a server.
Link this tool from a README, doc or site. The badge links back to this page.
[](https://yourhack.ai/env-to-json)