About this tool
.env ⇄ JSON Converter is a free, in-browser tool that turns environment-variable files into JSON and back again. Paste a .env file to get a tidy JSON object, or paste a JSON object to get KEY=value lines ready for a .env file. Everything is parsed locally in your browser — nothing is uploaded, and it uses JSON.parse only, never eval.
Going .env → JSON, it reads the file line by line: blank lines and # comments are skipped, a leading "export " is dropped, each line is split on its first = into a key and value, one layer of surrounding single or double quotes is trimmed from the value, and the result is serialized with JSON.stringify(obj, null, 2). Going JSON → .env, it parses the object and emits one KEY=value line per property; values containing spaces or special characters (or empty values) are wrapped in double quotes with backslashes, quotes and control characters escaped.
Use it to migrate config between formats, to inspect a messy .env as structured JSON, or to generate a .env from a settings object. The key count is shown so you can confirm nothing was dropped, and invalid JSON is reported rather than silently mangled.