DevTools Logo
All posts

Encrypting Files in the Browser: AES-256-GCM Without a Server

August 22, 2026 · DevTools

security
encryption
aes-gcm
privacy

Encrypting Files in the Browser: AES-256-GCM Without a Server

Upload-based "encryptors" have a trust problem: your plaintext file takes a round trip through someone else's server. The Client-Side File Encryptor does the same cryptography with Web Crypto, entirely on your device — the file and the password never leave the browser tab.

What actually protects the file

Three layers stack:

  1. PBKDF2-SHA256 at 250,000 iterations stretches your password into a 256-bit key. A weak password is still the weak point — the KDF raises the cost of guessing, it doesn't fix "password123".
  2. A fresh 16-byte salt per file means encrypting the same file twice with the same password produces different ciphertext — precomputed rainbow tables are useless.
  3. AES-256-GCM encrypts and authenticates. The GCM tag means any wrong password or flipped bit fails decryption loudly, instead of silently producing corrupted bytes.

The .dte format

Encrypted files are self-describing: a DTE1 magic header, then salt, then the 12-byte IV, then ciphertext+tag. Decryption reads the header back and needs nothing but the password — no sidecar files, no settings to remember. The tool even warns when you point encrypt mode at a file that already carries the header.

Practical uses and limits

  • Cloud hardening: encrypt documents before they sync to shared storage; the provider stores bytes it cannot read.
  • Email attachments: send the .dte by email, share the password by a different channel.
  • Recovery: none. A lost password means a lost file — there is no escrow by design.
  • Size: encryption happens in memory, so the tool warns above ~200 MB rather than pretending large files are comfortable.

For secrets that fit in a sentence rather than a file, the Self-Destructing Encrypted Note does one-time delivery; for quick text-only encryption there's the classic Text Encryptor.