Convert .env to JSON
Instantly convert .env files to JSON objects (and back). Mask secret values before sharing with teammates or storing in documentation.
Open .env ↔ Properties ↔ JSON Converter.
- A teammate needs your dev environment config but you cannot share the actual secrets.
- A tool you are integrating requires config as a JSON object, not a .env file.
- You are migrating a Node.js service to a Java Spring app and need to convert .env to .properties format.
- You want to document which environment variables your application needs without exposing values.
- Paste your .env content into the input box of the .env Converter.
- Select JSON as the output format and click Convert.
- Enable the Mask secrets option to replace values of keys containing SECRET, KEY, TOKEN, or PASSWORD with asterisks.
- Copy or download the output JSON for sharing or use in another tool.
- Values with spaces must be quoted in .env files (
VALUE="hello world"). The converter handles this automatically. - Comments (lines starting with
#) are stripped during conversion to JSON. - Keys are case-sensitive in .env and JSON —
DB_HOSTanddb_hostare different keys. - Multi-line values use a backslash continuation or quote wrapping — check your format before converting.
API service config with masked secrets
# App config APP_ENV=production APP_PORT=3000 DB_HOST=db.internal DB_PORT=5432 DB_PASSWORD=s3cretPassw0rd STRIPE_SECRET_KEY=sk_live_abc123 JWT_SECRET=my-jwt-secret
{
"APP_ENV": "production",
"APP_PORT": "3000",
"DB_HOST": "db.internal",
"DB_PORT": "5432",
"DB_PASSWORD": "********",
"STRIPE_SECRET_KEY": "********",
"JWT_SECRET": "********"
}
No. All conversion and masking runs entirely in your browser using JavaScript. Your .env content is never transmitted to any server.
The tool converts between .env (KEY=VALUE), Java .properties (key=value with comment and whitespace handling), and JSON object formats. Conversion works in any direction.
Yes. The mask option detects keys containing common secret indicators (SECRET, KEY, TOKEN, PASSWORD, PRIVATE) and replaces their values with asterisks before output, making the result safe to share.
Privacy-first: runs locally in your browser. No uploads.