🔧

.env ↔ JSON Converter

Convert between .env files and JSON/YAML format.

How to Use

  1. Paste your .env content or JSON object into the input panel. The tool auto-detects the format: lines with KEY=VALUE are treated as .env; input starting with { is treated as JSON.
  2. Click Convert (or type — it updates live). Comments and blank lines in .env files are ignored. Quoted values (single or double quotes) are correctly unquoted during conversion.
  3. Copy the output. When converting to .env, values containing spaces are automatically wrapped in double quotes. Use the Clear button to reset both panels.

Frequently Asked Questions

Are comments in .env files preserved?
Comment lines starting with # and blank lines are silently skipped during .env to JSON conversion. They cannot be round-tripped back because JSON has no comment syntax.
Are .env value types preserved?
All values are treated as strings in both .env and JSON output. Numeric-looking values like PORT=3000 become "3000" in JSON. If you need typed values, edit the JSON manually after conversion.
Is there a size limit?
No hard limit. Very large inputs may slow your browser.