Skip to content
Jellykit

.env to JSON

Convert a .env file to JSON. Handles comments, export prefixes, single and double quotes, escaped newlines and inline comments. Secrets never leave the page.

Runs in your browser. Nothing is uploaded.

About .env to JSON

Paste the contents of a .env file and get a JSON object of the same keys and values. The parser follows dotenv rules: lines starting with # are comments, export is ignored, quoted values keep their spaces, \n inside double quotes becomes a real line break and inline # comments after unquoted values are dropped.

That's useful for loading settings into tools that want JSON, such as hosting dashboards, secrets managers or test fixtures.

How to use .env to JSON

  1. Type or paste your text into the input box. Press Sample to see an example.
  2. The result appears instantly as you type.
  3. Copy the result, or press Use as input to chain another transformation.

Frequently asked questions

Are values converted to numbers?

No. Environment variables are always strings, so PORT=3000 becomes "3000", exactly as your app would see it.

Is it safe to paste secrets?

The conversion runs in your browser and nothing is uploaded, but treat the copied output with the same care as the original file.

Is .env to JSON free and private?

Yes. .env to JSON is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all developer tools →