Tool guide
About this tool.
- AES-256-GCM is an authenticated cipher: it hides the data and also detects any change to it. A passphrase is not a key, so the tool first stretches it into a 256-bit key with PBKDF2-SHA-256 and a random 16-byte salt, then encrypts with a random 12-byte IV.
- The output is a single Base64 envelope: one version byte, the PBKDF2 iteration count, the salt, the IV and the ciphertext with its 16-byte authentication tag. Because everything needed except the passphrase travels inside the envelope, decrypting needs only the envelope and the passphrase.
- Everything runs locally with the Web Crypto API. Nothing is uploaded, and the passphrase is never saved in drafts.
- Protect a note, a token or a small file before pasting it into a ticket, a chat or a config file.
- Open an envelope this tool produced and read the text or save the original file.
- Check how a passphrase-based scheme is put together. For real systems with key management use a vetted library; use Hash Generator or HMAC for integrity without secrecy.
Choose Encrypt or Decrypt and enter a passphrase.
In Encrypt mode type or paste text, or choose a local file, then set the PBKDF2 iterations if you need a different cost.
In Decrypt mode paste the Base64 envelope and choose Text or File output.
Copy or save the result. Keep the passphrase safe: it cannot be recovered.
- Encrypt "Hello, world!" with 10,000 iterations → an 84-character Base64 envelope.
- Encrypt the same text twice → two different envelopes, because salt and IV are random.
- Decrypt the envelope with the right passphrase → the original text and the iteration count it used.
- Decrypt with a wrong passphrase → "Decryption failed: wrong passphrase or corrupted data."
- Choose a local file in Encrypt mode → the file bytes are encrypted instead of the text.
- Decrypt with File output → the original bytes are saved as decrypted.bin or your filename.
- Text input is at most 1,048,576 characters; a local file is at most 5 MiB. A passphrase is at most 1,024 characters.
- The envelope is Base64 of 1 version byte (1), a 4-byte big-endian iteration count, a 16-byte salt, a 12-byte IV and the ciphertext followed by a 16-byte GCM tag.
- Iterations range from 1,000 to 10,000,000 and default to 600,000. The count is read back from the envelope when decrypting.
- Decrypting accepts standard or URL-safe Base64, with or without padding and with whitespace or line breaks.
- A wrong passphrase and a changed salt, IV, ciphertext or tag give the same "Decryption failed" message by design. An envelope that is too short, has an unknown version or holds an impossible iteration count gets its own message.
- Text output requires the decrypted bytes to be valid UTF-8; otherwise choose File output to keep the exact bytes.
- Encrypting is not signing: anyone with the passphrase can create a valid envelope. Use a proper key-management system for production secrets.