Skip to content

.env to JSON — KEY=VALUE lines to a JSON object

Paste dotenv-style KEY=VALUE lines (comments ignored) and get pretty JSON. Runs in your browser — do not paste production secrets.

.envJSON

Converts as you type — paste or drop a file.

Runs only in your browser. Do not paste production secrets or API keys — use a dummy .env for demos.

Input(.env)
Output(JSON)

Runs in your browser — nothing is uploaded to our servers.

Some tools want JSON config while you keep a .env locally. Convert a sanitized sample — never live credentials.

Steps

  1. Paste .env text
  2. Convert
  3. Copy JSON

Why this converter

  • Skips # comments
  • Supports export PREFIX
  • On-device only

Good for

  • Demo configs
  • Structure checks
  • Docs examples

Tips

  • Strip secrets before pasting
  • Quoted values are unwrapped

Examples

Input Output Note
APP_NAME=demo\nDEBUG=true {\n "APP_NAME": "demo",\n "DEBUG": "true"\n} —

FAQ

Are values typed?
No — everything stays a string, matching common dotenv behavior.
Is this safe for production keys?
No. Use dummy values. This tool is for local demos and structure checks only.

Related