# .env Studio

Paste or drop a .env file to see its keys and values in a table, with duplicates, empty values and syntax problems flagged by line. Values are hidden by default. You can compare a .env with a .env.example, or export an example file, JSON or a Kubernetes Secret. It checks common dotenv syntax, not tool-specific rules such as docker compose variable expansion.

- URL: https://tools.itlibra.com/en/env-studio
- On-device・No upload
- Last updated: 2026-10-26

## How to use

1. Paste the contents of a .env, or drop a file (“Choose file” works too). “Try a sample” shows how it works.
2. Check the table for duplicate keys, empty values and syntax problems, listed by line. Values are hidden; use the eye button on a row to show one.
3. Add a second file (for example a .env.example) to list keys that exist in only one, and keys whose values differ. Values are never shown there.
4. Use “Export” for a .env.example (keys only), JSON, YAML, a docker run --env-file, or a Kubernetes Secret or ConfigMap. You can sort and remove duplicates.

## Use cases

- Check that quotes, comments and multi-line values in a .env are written correctly
- Compare a production .env with its .env.example without showing the values
- Turn a .env into a Kubernetes Secret without typing base64 by hand
- Make a docker run --env-file version with the quotes removed

## What it does

### Common dotenv syntax

Supports KEY=value, export KEY=, # comments, trailing comments (outside quotes), single and double quotes, \\n inside double quotes, and multi-line values in quotes.

### Line-numbered findings

Lists duplicates (last one wins), empty values, invalid key names (leading digit, hyphen, dot), spaces around =, unclosed quotes, BOM and CRLF, each with a severity.

### Compare without showing values

Compares two .env files and lists keys present in only one, and keys whose values differ. The result never contains values.

### Likely secrets flagged in examples

A simple check for AWS-style keys, GitHub tokens, PEM private keys and long random strings. If one is in a .env.example, it is flagged as high severity.

### Kubernetes Secret and ConfigMap

Writes a Secret with base64 (UTF-8) data, or a ConfigMap with plain values. The page states that base64 is encoding, not encryption.


## Capability matrix

| Feature | Support | Notes |
| --- | --- | --- |
| Reading KEY=value, export, # comments, quotes and multi-line values | Supported | — |
| Line-numbered findings for duplicates, empty values, names, syntax and quotes | Supported | — |
| Comparing two .env files (values not shown) | Supported | — |
| Export to .env.example, JSON, YAML, --env-file and K8s Secret/ConfigMap | Supported | — |
| Detection of likely secrets | Partial | A simple format-based check; it can miss some and flag some non-secrets |
| ${VAR} expansion | Partial | Only expands earlier keys in the same file, top to bottom |
| Shell command substitution $(...) or docker compose-specific expansion | Not supported | — |
| Checking whether a secret is valid, revoking it, or applying a Secret | Not supported | No network requests; kubectl is not run |

## Limits & notes

- Input is limited to 200,000 characters and 2,000 keys. Anything beyond is not read, and you are told.
- Variable expansion differs between tools for undefined variables and precedence. Treat the expanded result as a reference.
- Secret and ConfigMap output is valid YAML in the expected shape. Check it with kubectl or your tooling before applying it to a cluster.
- docker run --env-file cannot represent a value with a line break, so such a key is left out of that export and listed.

## Privacy & safety

Pasted text and files are processed only inside your browser. Nothing is sent to or stored on a server, and nothing is saved in the browser. Usage analytics never include content or file names.

## FAQ

### When do I need quotes in a .env?

Quote a value that contains spaces, # or = to be safe. Outside quotes, a # preceded by a space starts a comment. Single-quoted values are taken literally, so \\n is not converted.

### How do I write a multi-line value?

Use double quotes and either a real line break or \\n. docker run --env-file cannot hold a line break, so that key is left out of the export.

### Are ${VAR} references expanded?

You can turn expansion on or off. Tools differ on how they expand; this one only uses keys defined earlier in the same file.

### Should a .env.example contain values?

Usually no. Keep the key names and leave the values empty. A likely secret in the example is flagged.

### Which value wins for a duplicate key?

Many tools use the last one, but not all. This page treats the last one as the value and flags the duplicate.
