Why doesn't decrypting with the wrong password show garbled text?
Because AES-GCM is an authenticated cipher: alongside the ciphertext travels a 16-byte tag computed with the correct key, and WebCrypto checks that tag before returning anything. If the wrong password produces a key that does not match the tag, the whole operation fails with an error instead of producing random bytes disguised as text.
What does PBKDF2 actually prevent when deriving the key from a password?
It prevents using the raw password as the encryption key. PBKDF2-HMAC-SHA256 applies the hash function repeatedly, 210,000 times by default in this tool, over the password combined with a random salt, which makes every brute-force attempt against the password hundreds of thousands of times slower than a single direct hash.
Why does the same text and the same password produce a different bundle every time?
Because the 16-byte salt and the 12-byte IV are freshly randomized on every encryption with `crypto.getRandomValues()`. This is intentional: it guarantees semantic security, meaning nobody can tell whether two bundles hide the same text just by looking at them.
Does the text or the password ever pass through a server?
No. Encryption and decryption call the WebCrypto API directly in the browser; the base64 bundle that comes out of the tool is already final, with no network call involved anywhere in the encrypt or decrypt process.