Compare Config Files Online

Paste two configuration files. See what was added, removed, or changed — line by line with word-level highlights.

🔒 100% private — runs entirely in your browser

or try sample data

What is Config File Diff?

Config File Diff compares two text-based configuration files and shows you exactly which lines were added, removed, or modified. It works with any config format — nginx, Apache, INI, TOML, .env, properties files, systemd units, and more.

Configuration files are critical infrastructure. A single misplaced directive can take down a server, break SSL, or expose sensitive data. When moving configs between environments (dev, staging, production) or reviewing changes from teammates, a clear visual diff prevents costly mistakes.

The tool uses LCS-based line comparison with word-level highlighting. Modified lines show exactly which words changed, not just that the line is different. Enable "Ignore whitespace" to skip indentation changes, or "Ignore case" for case-insensitive comparison. Everything runs client-side — your config data never leaves your machine.

Config File Comparison — Common Scenarios

Dev vs production nginx config

# Development: simple HTTP, localhost
server { listen 80; server_name localhost; location /api { proxy_pass http://localhost:3000; }
} # Production: HTTPS, gzip, real domain
server { listen 443 ssl; server_name app.example.com; ssl_certificate /etc/ssl/certs/app.pem; gzip on; location /api { proxy_pass http://backend:3000; }
}

Environment-specific changes (ports, hostnames, SSL) are immediately visible. The diff highlights each changed directive.

Comparing .env files

# .env.development
DATABASE_URL=postgres://localhost:5432/myapp_dev
REDIS_URL=redis://localhost:6379
LOG_LEVEL=debug
DEBUG=true # .env.production
DATABASE_URL=postgres://db.internal:5432/myapp_prod
REDIS_URL=redis://cache.internal:6379
LOG_LEVEL=error
SENTRY_DSN=https://key@sentry.io/123

Spot missing variables (DEBUG removed), changed values (LOG_LEVEL), and new additions (SENTRY_DSN) across environments.

Reviewing systemd unit changes

[Service]
Type=simple
User=app
ExecStart=/usr/bin/node /app/server.js
Restart=on-failure
RestartSec=5 # After adding resource limits:
[Service]
Type=simple
User=app
ExecStart=/usr/bin/node /app/server.js
Restart=always
RestartSec=10
MemoryMax=512M
CPUQuota=80%

The diff shows Restart policy change, new resource limits, and modified RestartSec value at a glance.

Config File Comparison Gotchas

Whitespace sensitivity varies by format

YAML is whitespace-sensitive (indentation defines structure), while INI and .env files are not. Use "Ignore whitespace" carefully — it's safe for .env and INI files, but may hide meaningful indentation changes in YAML configs.

Comments may be stripped by config parsers

Many config parsers ignore comments, so a comment change doesn't affect runtime behavior. However, comments often document why a setting exists. This tool shows comment changes alongside directive changes so you can track documentation drift.

Environment variable substitution

Configs with ${ENV_VAR} or $VARIABLE placeholders will differ between environments by design. When comparing templates (not resolved configs), these differences are expected and can be mentally filtered from the diff.

Frequently Asked Questions

How do I compare two config files?

Paste your configuration files into the two panels and click Compare. The tool shows a side-by-side diff with line-by-line comparison and word-level highlighting for modified lines.

What config file formats are supported?

Any text-based format: nginx, Apache, INI, TOML, .env, YAML, properties files, systemd units, sshd_config, and more. The tool performs line-by-line text comparison regardless of format.

Should I use "Ignore whitespace" for YAML files?

Be cautious. YAML uses indentation for structure, so whitespace changes can be semantically meaningful. Use the Kubernetes YAML Diff tool for YAML-specific comparisons.

Is my config data safe?

Yes. This tool runs entirely in your browser using client-side JavaScript. Your configuration files, including any secrets or credentials they contain, are never sent to any server.

Can I compare configs from different environments?

Yes. Comparing dev vs staging vs production configs is a primary use case. Paste the configs from each environment and the tool shows every difference, helping you catch missing variables or incorrect settings.