.env to JSON Converter

Paste a .env file and convert it to a clean JSON object in one click.

{}
0 keys 0 comments skipped 0 blank lines skipped

Summary

Paste a .env file and convert it to a clean JSON object in one click.

How it works

  1. Paste the contents of your .env file into the input box on the left.
  2. Lines starting with # are treated as comments and skipped.
  3. Blank lines are ignored automatically.
  4. Click "Convert" (or edit live) to see the JSON object on the right.
  5. Click "Copy JSON" to copy the result to your clipboard.
  6. Use the "Format" toggle to choose between compact and pretty-printed output.

Use cases

  • Convert .env config to JSON for use in scripts or APIs.
  • Share environment variable sets with teammates as JSON.
  • Debug and review all key-value pairs in a structured format.
  • Migrate dotenv settings into a JSON config file.
  • Quickly inspect which keys are defined in a .env file.

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu