ENV to JSON Converter

Turn a .env file into JSON.

Runs in your browser Free · no accountFile upload supported
Off keeps every value as a string.

.env

JSON

This conversion happens locally in your browser. Your files are never uploaded.

About the ENV to JSON converter

Environment files are the standard way to configure an application, and JSON is what most tooling wants when you need to inspect, transform or upload that configuration.

This parser follows the conventions the popular dotenv libraries share, including the details that trip up a naive split on the equals sign.

What is handled

Comment lines and inline comments, an optional `export` prefix, and values wrapped in single or double quotes. Double-quoted values have their escapes interpreted, single-quoted values are taken literally — which is exactly how the shell behaves.

A value containing an equals sign is kept whole, since only the first one separates key from value.

Type detection

Everything in a real environment variable is a string; the types here are a convenience for reading the result. `true`, `false`, `null` and plain numbers are converted, and anything with a leading zero is left alone so version numbers and account codes survive.

Turn it off when you need the values exactly as written.

Frequently asked questions

Are multi-line values supported?

Not yet — each variable must be on one line. Multi-line values wrapped in quotes across several lines are a dotenv extension rather than part of the common format.

Will this expose my secrets?

Nothing is transmitted, so the file stays on your device. Do bear in mind that anything you paste ends up in your clipboard history, which is worth thinking about for production credentials.

Is my data uploaded?

No. The conversion runs in your browser, which matters here — configuration files and spreadsheets routinely contain credentials and personal data.