Developer tool / 16
Dotenv (.env) Parser & Converter
Parse .env environment variables into JSON, shell export scripts, or Kubernetes ConfigMap YAML.
Dotenv (.env) Parser & Converter: TOEA extracts KEY=VALUE declarations, stripping comments and unwrapping quotes. Runs 100% locally in your browser with zero server file uploads.
- Category
- Developer tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
How lines are read
A # starts a comment at the start of a line, or after a space, so KEY=abc#1 keeps abc#1 while KEY=abc #note gives abc. Quotes around a value are removed, and \n becomes a line break only inside double quotes. A value cannot span several lines, and a later duplicate key overrides an earlier one. References such as ${HOME} are copied as written: Node's dotenv does not expand them either, while tools such as Docker Compose do. Every value is a string, so PORT=3000 becomes "3000".
Kubernetes and shell output
A ConfigMap is for settings, not passwords or API keys. For those, create a Secret, which kubectl create secret generic app-env --from-env-file=.env does directly; its values are only Base64-encoded, so restrict who can read it. The ConfigMap name must be lowercase letters, digits, -, and ..
In the shell script, each value is in single quotes, so the shell expands nothing when the file is sourced: a password such as pa$word or a value with backticks arrives unchanged. A single quote inside a value is written as '\'', which closes the quote, adds an escaped quote, and reopens it. Load the script with source or .; running it as a separate process sets the variables only in that process.
How to use it
- Paste your .env file contents.
- Select output format (JSON, export, or ConfigMap).
- Copy the formatted config.
Privacy & limitations
Secrets and environment keys stay strictly in your browser.
Related tools
Frequently asked questions
Are comments supported?
Yes, line comments starting with '#' and inline comments are handled cleanly.
Free tool · runs in your browser · no account required