Assemble a .gitignore from curated templates for languages, frameworks, editors and operating systems.
Environment Variable Formatter
Convert KEY=value pairs between dotenv, shell export, Docker, Compose, Kubernetes, JSON and YAML formats.
- Free
- No sign-up
- Runs in your browser
Input
0 characters
Processed entirely in your browser. Nothing is uploaded.
Fill in Variables to continue.
Enter your input to see the result
Everything happens on this device. No upload, no account, no network request.
How to use this tool
- 1
Paste your variables, one KEY=value per line. Comments and blank lines are ignored, and a leading `export` is stripped.
- 2
Choose the output format. Values needing quotes get them.
- 3
Converted in your browser. These are usually secrets, and none of them is transmitted.
Questions about Environment Variable Formatter
When does a value need quoting?
Whenever it contains whitespace, a quote, a dollar sign, a backtick or a backslash. Unquoted, the shell splits on the whitespace and expands the `
Why does my .env work locally but not in Docker?
Because the formats differ. Docker’s `--env-file` does not process quotes at all: `KEY="value"` sets the value *including* the quote characters. It also does not support multi-line values or variable interpolation. The Docker output here accounts for that.
Is it safe to paste production secrets here?
The conversion happens in your browser and nothing is transmitted, so the values do not leave your device. The same two caveats as elsewhere apply: a browser extension with page access could read them, and they may linger in your clipboard. For production credentials, a local script is the better habit.
Is my data sent anywhere?
No. This tool runs as JavaScript inside your browser tab. There is no network request carrying your input, nothing is written to a server log, and it keeps working with your connection switched off. You can confirm it in the browser’s network panel. That matters more here than elsewhere on the site: developer tools handle tokens, keys and production data.
Does the Environment Variable Formatter work offline?
Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Environment Variable Formatter keeps working with the network switched off and nothing is ever sent to a server.
Related tools
Other tools you might reach for next.
Format and indent JSON, with optional alphabetical key sorting and a precise syntax error when it will not parse.
Strip every byte of insignificant whitespace from JSON and report the saving.
Check that JSON is syntactically valid, report its structure, and flag duplicate keys that JSON.parse accepts silently.
Compare two JSON documents structurally, by path, distinguishing a type change from a value change.
Evaluate a JSONPath expression against a document and see every match with the path that produced it.
Escape text so it can be embedded as a JSON string value, handling control characters and astral code points.
Decode an escaped JSON string back to its raw text, with or without the wrapping quotes.