ENV to JSON Converter

Convert a .env file's variables into a JSON object.

From env format to JSON

A .env file lists configuration as simple KEY=value lines, but sometimes you need those settings as a JSON object — to feed a tool that expects JSON, to inspect them as structured data, or to transform them. This parses a .env file and converts its variables into a JSON object, handling the quoting and comments that env files allow.

Paste your .env and it becomes a JSON object.

Handling the env quirks, and the secrets

Reliable conversion deals with the small quirks of env format: comment lines, quoted values, and values that themselves contain equals signs. One important caution, because env files hold secrets: this runs entirely in your browser, so keys and passwords never leave your machine, but be careful where the resulting JSON ends up — you do not want to paste config full of live secrets into somewhere less private. If your aim is to share config safely, sanitising the secrets out first is the safer path.

Common questions

What does it convert?

The KEY=value lines of a .env file into a JSON object, handling comments and quoted values.

Is it safe with secrets in my .env?

The conversion runs in your browser so nothing is uploaded, but take care where the resulting JSON goes, since it contains the same secrets.

Is my file uploaded?

No. The conversion happens in your browser.

More Developer tools