Skip to main content
QUIETLYTIC
Developer

Env Diff

Compare two versions of a config file line by line.

Local · nothing leaves this browser Waiting for two files
Esc Clear
Esc Clear
What changed

Paste text in both panes above.

How it works

A `.env` file, an nginx config, a systemd unit — none of it is JSON, so a structural diff has nothing to walk. A line diff is the right tool for exactly this shape: compare two versions of a text file line by line and show what moved, without needing to understand the file's grammar at all.

Matched by content, not by line number

This finds the longest run of lines both files share in the same order and reports everything outside that run as added or removed — the same method diff and every version control system use. A single line inserted near the top does not cascade into every later line reading as "changed," the way a naive position-by-position comparison would.

Every line, not just values

Unlike the `.env` Validator or the Env File Converter, this does not parse KEY=value pairs — it compares raw lines. That is deliberate: a config file's comments, blank-line spacing and key ordering are often exactly what changed, and a parser that normalised those away before comparing would hide the edit you're looking for.

Example

Changing PORT=8080 to PORT=3000 reports one removed line and one added line, even though only the value changed — a line diff has no concept of "the same key with a different value," only whole lines that match or don't.

Frequently asked questions

How is this different from JSON Diff?

JSON Diff walks parsed values and ignores formatting; this walks raw lines and does not parse anything, because most config files that need comparing — .env, nginx config, a systemd unit — are not JSON. A line diff is the right tool for text that has no structure a parser can lean on.

How are matching lines found?

By the longest run of lines both files share in the same order — the same method the Unix diff command and every version control system use. Everything outside that run is reported as added or removed, so one line inserted near the top does not cascade into every later line reading as changed.

Is either file sent anywhere?

No. Both are compared in your tab. A config diff is frequently run on two versions of something holding live credentials specifically to see what someone changed, which is the case where that matters most.

Related tools

From the intelligence desk