Env to JSON Converter

Convert .env configuration files to JSON format and convert JSON to .env format.

🔒 Client · Offline
Mask values

About .env and JSON

This tool converts a .env file to JSON, and JSON back to a .env file. A deployment platform often asks for one form when your project holds the other.

Quote handling: Single-quoted values are taken literally. Double-quoted values unescape \n, \r, \t, \", and \\. An inline comment after a space and # is removed from unquoted values.

Variable handling: The tool does not expand ${VAR} references or run shell commands. The export prefix is stripped on parse.

Diagnostics: The tool reports line numbers for duplicate keys and for lines that have no = sign or an unclosed quote. No lines are dropped silently.

Value masking: Enable the "Mask values" toggle to replace all values with *** in the output. The original input stays unchanged.

.env.example: The "Download .env.example" action strips all values while keeping keys, comments, and blank lines. The example file is safe to commit.

Paste your file, then change the direction. The tool moves the result into the input when you change the direction, so your work is not lost. Nothing is uploaded.