ENV to ConfigMap Converter
Turn a .env file into Kubernetes ConfigMap or Secret YAML, locally and byte-safely.
.env file
4 lines · 78 charsKubernetes YAML
4 key(s)Details
Kubernetes ConfigMaps store plain configuration and Secrets store base64-encoded data. Paste a .env file and choose the target object, name and namespace. Values with spaces, quotes and embedded newlines are emitted as YAML block scalars; Secret data is encoded from UTF-8 bytes so non-ASCII text survives. Keys are checked against DNS-1123 rules with lowercase suggestions, and duplicate keys follow .env last-wins semantics with a warning.
More examples
Application settings
APP_NAME=demo
PORT=8080
FEATURE_FLAGS=alpha,betaEach assignment becomes a quoted key under data in the generated ConfigMap.
Multiline PEM
PRIVATE_KEY='-----BEGIN KEY-----
abc
-----END KEY-----'Multiline values are emitted with the YAML block scalar |- so indentation stays valid.
Secret with Unicode
GREETING=Grüße 😀Base64 Secret output encodes UTF-8 bytes, preserving non-ASCII characters.
Examples
Simple config
PORT=8080
APP_NAME=demodata: PORT '8080', APP_NAME 'demo'Each key becomes a quoted scalar under data.
Multiline PEM
PRIVATE_KEY='-----BEGIN KEY-----
abc
-----END KEY-----'PRIVATE_KEY: |- followed by indented linesYAML block scalars preserve line breaks without trailing newline ambiguity.
Unicode secret
GREETING=Grüße 😀Base64 text under Secret.dataBase64 is computed from UTF-8 bytes, not Latin-1 code units.
Duplicate keys
A=first
A=secondA: 'second' plus a duplicate warningLast value wins, matching shell/dotenv grammar.
About this tool
ENV to ConfigMap Converter translates a .env file into Kubernetes ConfigMap or Secret YAML. It preserves value quoting, supports export prefixes, joins multi-line quoted values and encodes Secret data from UTF-8 bytes so unicode is safe.
Keys are checked against DNS-1123 rules with suggestions, and duplicate keys follow .env last-wins semantics with a visible warning. Names, namespaces and immutability controls are available inline; values are emitted with YAML quoting or block scalars as appropriate.
All conversion runs in the browser. Nothing is uploaded, and the resulting YAML can be copied or downloaded straight into a deployment workflow.
What this tool does not do
- Input follows simple KEY=VALUE dotenv grammar; interpolation such as ${VAR} is not evaluated.
- Base64 is encoding, not encryption; the tool does not protect secret values.
- Multiline values are detected from quoted spans; unquoted multi-line values are treated as separate assignments.
- Kubernetes 1 MiB object limits are warned about but not enforced by the tool.
- No cluster connection is made; the tool only emits YAML text.
How to use this tool
Paste the env file
Paste assignments in KEY=VALUE form. export prefixes, comments, quoted values and blank lines are handled.
Choose the object
Switch between ConfigMap and Secret, set name and namespace, and choose base64 data or plain stringData.
Review warnings
Check duplicate-key and key-name warnings; invalid keys block output until corrected.
Copy or download
Copy the YAML into a manifest or save it as a file for kubectl apply.
Use cases
Migration to Kubernetes
Move an existing .env file into a manifest without hand-quoting every value.
Secret preparation
Generate base64 Secret data locally rather than shipping values through a web service.
Config reviews
See all keys and values in one YAML block before committing them.
Teaching Kubernetes
Show the difference between ConfigMap data and Secret data/stringData.
Output forms
| Setting | Effect |
|---|---|
| ConfigMap + data | Single-line values quoted; multiline values as |- block scalars |
| Secret + data | Values base64-encoded from UTF-8 bytes |
| Secret + stringData | Plain values; Kubernetes encodes them on create |
| immutable | Adds immutable: true to the object |
| namespace | Adds metadata.namespace when provided |
Kubernetes limits objects to 1 MiB; a warning appears at 80% of that budget.
Common mistakes
Mistake:Putting underscores in ConfigMap keys.
Fix:DNS-1123 keys allow lowercase letters, digits, dashes and dots; the tool suggests a replacement.
Mistake:Assuming base64 is encryption.
Fix:Secret data is only encoded; use RBAC and encryption at rest to protect values.
Mistake:Using a block scalar for a value with trailing spaces.
Fix:Trailing spaces are preserved in quoted single-line values; block scalars strip them.
Mistake:Expecting duplicates to produce two YAML keys.
Fix:Dotenv last-wins semantics apply, and the duplicate is reported.
Mistake:Pasting token values into a random web tool.
Fix:This converter works entirely in the browser and never transmits input.
Frequently asked questions
When should I generate a Kubernetes Secret instead of a ConfigMap?
Use ConfigMaps for non-sensitive settings like feature flags, URLs, and ports, and Secrets (coupled with RBAC and encryption at rest or external secret managers) for API keys, tokens, and passwords.
Is Kubernetes Secret base64 encoding encryption?
No. Base64 in a Secret YAML is plain binary-to-text encoding anyone can decode; never commit raw Secret manifests to Git without Sealed Secrets, SOPS, or an external secret store.
How are multiline values like PEM keys formatted?
Multiline ConfigMap entries emit clean YAML block scalars (|-), while Secret data encodes raw UTF-8 bytes to standard single-line base64.
Is my .env file uploaded anywhere?
Never. Conversion happens 100% locally in your browser with no persistence or telemetry.
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.