.env File Parser
Parse and analyze .env files — view variables, types, warnings, and export as JSON.
Warnings5
Variables
| Line | Key | Value | Type |
|---|---|---|---|
| 2 | NODE_ENV | production | string |
| 3 | PORT | 3000 | number |
| 4 | APP_URL | https://example.com | url |
| 7 | DATABASE_URL | postgres://user:pass@localhost:5432/mydb | url |
| 8 | DB_HOST | localhost | string |
| 9 | DB_PORT | 5432 | number |
| 10 | DB_NAME | myapp | string |
| 13 | JWT_SECRETsecret | super-secret-jwt-key-do-not-share | string |
| 14 | API_KEYsecret | abcdef1234567890 | string |
| 15 | AUTH_TOKENsecret | Bearer xyz123 | string |
| 18 | ENABLE_LOGGING | true | boolean |
| 19 | DEBUG | false | boolean |
| 22 | OPTIONAL_FEATURE | (empty) | empty |
| 25 | APP_NAMEdup | MyApp | string |
| 26 | APP_NAMEdup | MyAppV2 | string |
Last updated:
Parse and check a .env file
This .env file parser reads the text of a .env file and lists every variable in a table. It also flags common problems: duplicate keys, empty values, keys with spaces, lines that are not valid, and keys that look like secrets. You can then export the variables as JSON.
How to use it
- Paste your file into the .env File Content box. A sample file is loaded to start with.
- Click Clear to empty the box first if you want to paste your own.
- Read the summary counts: Variables, Comments, Empty values and Duplicates.
- Check the Warnings list, then the Variables table with line number, key, value and type.
- Click Export as JSON to download an
env.jsonfile.
How it works
The parser goes line by line. Blank lines and lines starting with # are counted as blanks and comments. Other lines are split at the first =. A leading export before the key is removed. For unquoted values, an inline comment starts at a space followed by #.
Quoted values can use double quotes, single quotes or backticks, and may run over several lines. Inside double quotes, \n, \t, \" and \\ are expanded. Single-quoted and backtick values are kept as written. An unclosed quote is reported as an invalid line.
What you see
| Type | Detected when |
|---|---|
| empty | The value is blank |
| boolean | true, false, yes, no, 1 or 0 (any letter case) |
| number | The value reads as a number |
| url | Starts with http, https, ftp, redis, postgres, mysql, mongodb or amqp followed by :// |
| string | Anything else |
A key is marked secret if its name contains words such as password, secret, token, key, api, auth, private or credential. Duplicate keys are marked dup on every line where they appear. Values longer than 40 characters are shortened, with a show/hide link.
Assumptions and limits
- The secret flag only looks at the key name, not at the value.
- Values are shown as plain text, not hidden, so be careful when sharing your screen.
- Variable references such as
${OTHER}are not expanded. - The JSON export uses the last value when a key appears twice.
- Parsing happens on the page. The code shows no upload or network request.
Frequently asked questions
Why is "1" or "0" shown as a boolean?
The tool treats true, false, yes, no, 1 and 0 as boolean-like values. A port or count of 0 or 1 will therefore show as boolean, not number.
Does it support export KEY=value lines?
Yes. The export prefix is stripped, so the key is listed as plain KEY.
What does a duplicate key warning mean?
The same key is set more than once. Most dotenv loaders keep only one of the values, so check which one your app really uses.
Related Developer Tools
Browse all tools from the same category.
Domain Authority Checker
Check Moz authority, page authority, spam score, and backlink metrics
Open toolSEO Audit Tool
Audit a website URL for technical SEO, metadata, headings, broken internal links, hreflang, canonical and X-Robots-Tag checks, with report exports
Open toolShowing 1-2 of 49