AES Encryption

Encrypt a note or a file with AES-256-GCM and a passphrase, entirely in your browser. The passphrase is stretched with PBKDF2 over 600,000 iterations — OWASP's current floor, not the 100,000 many tools still ship — with a fresh random salt and a fresh IV every time. GCM authenticates as well as encrypts, so altered data is rejected rather than decrypting into plausible nonsense, and a wrong passphrase fails identically to tampering, giving an attacker nothing to learn from. The output carries its own salt, IV and iteration count, so it stays decryptable even after the defaults change. Nothing is uploaded, and nothing is recoverable: lose the passphrase and the data is genuinely gone.

What the output contains

PartSizeSecret?
Format version1 byteNo
Iteration count4 bytesNo
Salt16 bytesNo — public by design
IV12 bytesNo — public by design
Ciphertext + tagRestYes

When to use it

  1. Encrypt a note before storing it in a cloud drive.
  2. Send a secret through a channel you do not trust.
  3. Protect a file on a shared machine.
  4. Keep recovery codes somewhere only you can read.
  5. Check that a ciphertext still decrypts before relying on it.

How to Use

  1. Type or drop in what you want to encrypt.
  2. Enter a passphrase you will not lose.
  3. Copy or download the result — and keep the passphrase somewhere safe.

Features

  1. AES-256-GCM, authenticated
  2. PBKDF2-SHA256 at OWASP's 600,000 iterations
  3. Fresh random salt and IV every time
  4. Text and file modes
  5. Self-describing output that survives a change of defaults
  6. Tamper detection
  7. Web Crypto only, no bundled cryptography
  8. Runs entirely in your browser

FAQs

Is this actually secure?

The cryptography is the browser's own Web Crypto — AES-256-GCM and PBKDF2-SHA256, the same primitives a server would use, audited and constant-time where that matters. What you have to judge is the passphrase: a weak one is guessable however good the cipher is, which is what the iteration count exists to slow down.

Why 600,000 iterations?

That is OWASP's current recommendation for PBKDF2-HMAC-SHA256. Older guidance said 100,000 and plenty of tools still ship it. The count only exists to make offline guessing expensive, and hardware keeps getting faster. It is adjustable, and it is stored in the output so older ciphertext still decrypts.

What if I lose the passphrase?

The data is gone. There is no reset, no recovery and no backdoor — that is what it means for the encryption to work. Write the passphrase down somewhere safe before you rely on this.

Why GCM rather than CBC?

Because GCM authenticates. Tampered data is rejected instead of decrypting into plausible-looking garbage, and a wrong passphrase fails in exactly the same way as tampering, so an attacker learns nothing from the error.

Is my text or file uploaded?

No. Everything happens in the page, and you can confirm it with your browser's network tab — there are no requests during encryption or decryption.

What is in the output?

A version byte, the iteration count, the random salt, the random IV, then the ciphertext and its authentication tag, Base64 encoded. None of that is secret; salts and IVs are public by design, and carrying them is what makes the output self-contained.

Can I decrypt it somewhere else?

Yes, if you reimplement the envelope: PBKDF2-SHA256 with the stored salt and iteration count, then AES-256-GCM with the stored IV. It is a documented layout rather than a proprietary one.

Does it work on large files?

Up to whatever your browser can hold in memory, since the whole file is encrypted in one pass. Very large files may be slow at 600,000 iterations — though that cost is paid once, not per megabyte.

Technical Details

Everything here is the browser's own Web Crypto rather than a bundled implementation, which matters more for encryption than for anything else on this site: the platform's AES and PBKDF2 are audited, constant-time where timing leaks would matter, and cannot be quietly swapped by a compromised dependency in the way a JavaScript crypto library can. The passphrase is stretched into a key with PBKDF2-HMAC-SHA256 over a fresh random 16-byte salt, defaulting to 600,000 iterations — OWASP's current floor. Plenty of tools still ship the 100,000 that older guidance suggested; the number exists to make an offline guessing attack expensive and hardware has moved since. AES-256-GCM does the encryption, with a fresh random 12-byte IV every single time, because reusing an IV under the same key breaks GCM catastrophically rather than gracefully: it reveals the XOR of the two plaintexts. GCM is chosen over CBC because it authenticates. That means a wrong passphrase and deliberately altered data fail the same way, with no oracle telling an attacker which — and it means tampering is detected rather than decrypting into plausible-looking garbage. The output is a self-contained envelope: a format version, the iteration count, the salt, the IV, then the ciphertext and its authentication tag, Base64 encoded. None of that is secret. A salt and an IV are public by design, and carrying the iteration count is what lets something encrypted today still decrypt after the default changes. The version byte means the format can change without silently mis-reading old output. Text is UTF-8 encoded before encryption, so non-Latin scripts and emoji survive the round trip intact. Files go through the same path as bytes, with no size limit beyond available memory. Nothing is uploaded, and there is no recovery: a forgotten passphrase means the data is gone, which is the honest consequence of encryption that actually works.

Security Tools

Security Tools

  • Bcrypt Hash Generator
  • BIP39 Mnemonic Generator
  • CVSS Calculator
  • CORS Debugger
  • RSA Key Generator
  • SRI Hash Generator
  • Permissions-Policy Builder
  • htpasswd Generator