# .env File Parser

> Paste a .env file to list its variables, spot duplicate keys, empty values and likely secrets, see each value type and export the result as JSON.

- Page: https://mondaytool.com/tools/env-parser
- Category: developer-tools
- Price: free, no sign-up. Most tools run in the browser, so input is not uploaded.
- Use it: open https://mondaytool.com/tools/env-parser. It is an interactive web page; this file is its documentation.

Last updated: 16 October 2026

## 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

| 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.
