Skip to content
gohacks.dev
Security

AES Encryption Tool

Encrypt text with AES-256-GCM using a password, or decrypt it again, with the key derived by PBKDF2 and everything done by your browser's Web Crypto.

Free · No sign-up · Your inputs stay in your browser

Input

Encrypt and decrypt text with AES-256-GCM

Output

Ciphertext

0 characters

The key is derived from the password with PBKDF2-SHA256 at 600,000 iterations and a random salt, and the text is encrypted with AES-256-GCM under a random 96-bit IV. The output is base64 of salt, IV and ciphertext with its authentication tag, so the same password decrypts it here or in any Web Crypto, Node or Python cryptography code that follows the same layout. Encrypting the same text twice gives different output; that is the random salt and IV working.

Runs in this browser. Nothing you paste is sent to a server.

Why GCM

AES-GCM is authenticated encryption: the tag lets decryption detect any change to the ciphertext and refuse it, rather than returning garbage or, worse, attacker-controlled plaintext. Older modes such as CBC need a separate MAC to get that. GCM requires an IV that is never reused with the same key, which a random 96-bit IV per message provides. The construction is specified in NIST SP 800-38D.

Sharing secrets

The output is safe to paste into a chat or a ticket as long as the password travels by a different channel. For files and teams, age, sops and password managers' sharing features are better long-term tools.

Share

Frequently asked questions

Why is the output different each time for the same text?
A new random salt and IV are used every time, which is required for security. Both are included in the output so decryption works.
Can I decrypt this with OpenSSL?
Not with openssl enc, which does not support GCM. Python's cryptography package, Node's crypto module or any Web Crypto code can, using the same salt, IV and iteration layout.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools