EV

.env File Parser

Parse and analyze .env files — view variables, types, warnings, and export as JSON.

15
Variables
6
Comments
1
Empty values
1
Duplicates

Warnings5

Duplicate key "APP_NAME"
"OPTIONAL_FEATURE" has an empty value
"JWT_SECRET" looks like a secret
"API_KEY" looks like a secret
"AUTH_TOKEN" looks like a secret

Variables

LineKeyValueType
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
About this tool

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

  1. Paste your file into the .env File Content box. A sample file is loaded to start with.
  2. Click Clear to empty the box first if you want to paste your own.
  3. Read the summary counts: Variables, Comments, Empty values and Duplicates.
  4. Check the Warnings list, then the Variables table with line number, key, value and type.
  5. Click Export as JSON to download an env.json file.

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

TypeDetected when
emptyThe value is blank
booleantrue, false, yes, no, 1 or 0 (any letter case)
numberThe value reads as a number
urlStarts with http, https, ftp, redis, postgres, mysql, mongodb or amqp followed by ://
stringAnything 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.

More to explore

Related Developer Tools

Browse all tools from the same category.

Showing 1-2 of 49