.env ↔ JSON Converter

Convert your .env file to JSON, or a JSON object to .env format. Comment lines, the <code>export</code> prefix, and quoted values are handled correctly.

Runs 100% in your browser — the content you paste (including secrets like API keys or passwords) is never sent to a server, it's only processed in your browser.
Conversion direction

Try This Next

Finished here? These might be your next step.

Frequently Asked Questions

Lines starting with # and completely empty lines are ignored during .env→JSON conversion; only lines in KEY=VALUE format are processed.

If a nested object or array is found during JSON→.env conversion, that value is converted to a single-line string with JSON.stringify and written, with a note appended indicating this — because the .env format is inherently made of flat key=value pairs.

Last updated: