Convert .env File to JSON
Paste the contents of an .env file to get an equivalent JSON object. Comments (#), blank lines and values in single or double quotes are handled correctly.
How it works
A .env file stores environment variables in the format KEY=VALUE, one per line. To use it in a context that expects JSON (a config file, an automated test, a quick inspection), paste its contents and click "Convert to JSON": each variable becomes a key in the resulting JSON object.
How are value types determined?
The values true and false become JSON booleans, purely numeric values become numbers, and everything else remains a string. Values surrounded by quotes (single or double) are always treated as strings, with quotes removed, so you can force a numeric value like "3000" to remain text if needed.
What happens to commented or malformed lines?
Blank lines and lines starting with # are silently ignored, as in a real .env file. A line that does not contain an equals sign = is reported in a warning and does not appear in the generated JSON, to avoid producing an incorrect result without warning.
100% local processing: the conversion takes place entirely in your browser—your potentially sensitive environment variables never leave your device.