๐Ÿ”ง .env File Parser

3 variables
API_URLhttps://example.com
DEBUGtrue
SECRET_KEYabc123

Parse the contents of a .env file (KEY=VALUE format) into a list of key-value pairs, or convert it to JSON. Duplicate keys are flagged with a warning. Everything runs entirely in your browser.

How to use

  1. Paste the contents of your .env file into the input box.
  2. The parsed key-value pairs are listed automatically.
  3. Copy the JSON-converted result with the "Copy" button.

FAQ

How are comment lines (starting with #) handled?

Lines starting with # are ignored and not parsed.

What if a value is wrapped in single or double quotes?

The surrounding quote characters are stripped automatically, leaving just the inner string as the value.

What happens if the same key is defined more than once?

Duplicate keys are flagged with a warning marker. In the JSON output, the later-defined value wins โ€” matching how a typical .env loader behaves.