.env File Validator

Find mistakes in a .env file: lines without =, duplicate variables, unclosed quotes, unquoted values with spaces, odd variable names and trailing spaces.

Processed on your device. Files are not uploaded

How to check a .env file

  1. Paste your .env file

    Paste or type it into the box, or press Try an example.

  2. Read the result

    A green or red message says whether it is valid, with the details below.

  3. Fix and re-check

    Edit the text and the result updates straight away.

When to use .env File Validator

An application will not start, and you suspect a typo in the .env file.

You want to check a file for duplicates and unquoted values before committing a template.

Tips for a better .env File Validator result

Paste the file, or a copy with secrets replaced, and read the errors and warnings with their lines.

Quote values that contain spaces or a # so they are not cut off.

.env File Validator: limits and what to check

It assumes the common dotenv rules, and different loaders differ on edge cases, which is why some findings are warnings.

Nothing leaves your device, but use a copy without real secrets when you can.

About .env File Validator

Find mistakes in a .env file: lines with no =, variables set twice, quotes that are never closed, values with spaces that are not quoted, a # that may start a comment, odd variable names and trailing spaces. Errors and warnings are listed with their line.

FAQs

Is it safe to paste real secrets?

Nothing leaves your device, but use a copy with the secrets replaced when you can.

Which loaders does it assume?

The common dotenv rules. Different loaders differ on edge cases, which is why some findings are warnings.

Can I turn it into JSON?

Use .env to JSON Converter.

Related tools