.env File Converter
Turn a .env file into JSON, AWS Secrets Manager, GitHub Secrets, a Kubernetes Secret, a Docker env-file or Compose environment. Nothing is uploaded.
Convert a .env file to JSON, AWS Secrets Manager, gh secret set commands, a Kubernetes Secret with base64 values, a Docker --env-file or a Compose environment block. Values are masked on screen, and nothing you paste is uploaded.
Nothing you paste is uploaded or saved.
Values are hidden, so the base64 below encodes the dots, not your values. Copy and Download use the real values; tick Show values before selecting text by hand.
Not converted
Duplicate keys
Lines that are not KEY=VALUE
How to use the .env File Converter
- Paste your .env file into the input, or press Example to see how it works.
- Pick a format tab. For GitHub Secrets or a Kubernetes Secret, fill in the options if you need them.
- Check the Not converted list, then press Copy or Download. Tick Show values only if you want to read the values on screen.
Frequently asked questions
How do I convert a .env file to JSON or a Kubernetes Secret?
Paste the .env file into the input. Pick JSON, AWS Secrets Manager, GitHub Secrets, Kubernetes Secret, Docker env-file or Compose with the tabs, then press Copy or Download.
Is my .env file uploaded anywhere?
No. The conversion runs entirely in your browser. Nothing you paste is uploaded or saved, and it is never added to the URL. Only your selected tab is remembered.
Are the values hidden on screen?
Yes. Values are masked in the displayed output until you tick Show values. Copy and Download always use the real values, so mask a screenshot, not your clipboard.
What happens to keys that cannot be converted?
They are never dropped silently. Keys a format cannot hold, such as a lowercase GitHub secret name, are listed under Not converted with a reason. Duplicate keys and lines that are not KEY=VALUE are listed too.
Does it handle quotes, comments and export?
Yes. It reads single and double quotes, escapes inside double quotes, inline comments, the export prefix, CRLF line endings and a UTF-8 byte order mark.
Fun facts about .env files
- The dotenv idea comes from the Twelve-Factor App method, which says to keep configuration in the environment, not in code.
- The original dotenv library was written for Ruby by Brandon Keepers in 2012, and the Node.js port followed soon after.
- Kubernetes Secret values are only base64-encoded, which anyone can reverse, so they are not encrypted by default.
- Docker’s --env-file does not remove quotes, so KEY="x" gives the container the value "x" with the quotes included.