GGfor Tools

AES Encrypt / Decrypt Tool

Encrypt UTF-8 text into an AES-256-GCM package, or decrypt a supported package with its passphrase. Operations run only when you click Encrypt or Decrypt.

Encrypt text or decrypt a package

Inputs remain editable; the result appears separately below. Edits discard the result. New packages use v2; supported v1 packages can still be decrypted.

New encryption: 100,000–2,000,000 whole iterations; default 600,000. Decryption reads the package’s own count. Higher counts cost more time and do not repair a weak passphrase.

Waiting for input...

AES text encryption guide: passphrases, packages and compatibility

This tool encrypts UTF-8 text using AES-256-GCM and a key derived with PBKDF2-HMAC-SHA-256. It is a text package tool, not a file vault, password manager or universal AES decoder. Keep the complete package and its passphrase to decrypt later.

How to encrypt and decrypt text

For encryption, enter a passphrase and plaintext, choose the iteration count and package format, then click Encrypt. Save the read-only result. For decryption, paste a supported package into Ciphertext package and enter its passphrase, then click Decrypt. You can transfer an encrypted result to the decryption input with the dedicated button. There is no automatic processing or field swapping.

Why does the same text produce different ciphertext?

Each encryption generates a fresh 16-byte salt and 12-byte IV with Web Crypto. The salt changes the derived key, and the IV is used by AES-GCM. The package includes both values because they are needed for decryption and are not secret. GCM uses a 128-bit authentication tag, appended to the ciphertext bytes.

Passphrases and PBKDF2 iteration counts

Use a long, unique passphrase and keep it separate from the package. AES-256 does not make a weak passphrase equally strong. New encryption defaults to 600,000 iterations and accepts integers from 100,000 to 2,000,000. Decryption uses the saved package count; v1 allows 10,000 to 2,000,000 for compatibility. Unsupported counts are rejected without silently changing them. A lost passphrase cannot be reset by this tool.

JSON, Base64 and v1/v2 package compatibility

JSON and Base64(JSON) carry the same package; Base64 is not an extra encryption layer. Save every field: v, alg, kdf, hash, iter, salt, iv and ct. New v2 packages authenticate the fixed metadata as additional data. Supported v1 packages use the earlier layout without that additional data. Both require AES-GCM, PBKDF2 and SHA-256. Raw ciphertext, OpenSSL output and arbitrary third-party AES formats are not interchangeable with this package.

Why can decryption fail?

Check the complete package and exact passphrase, including spaces. A wrong passphrase, changed ciphertext or altered authenticated parameters can fail the GCM check; the tool cannot reliably distinguish those causes. Unsupported versions, malformed Base64, unexpected fields and invalid lengths are rejected before key derivation. Inputs are preserved and no failed result becomes copyable.

Text handling and size limits

Empty plaintext is valid. A leading UTF-8 BOM is preserved; unpaired Unicode surrogates and invalid decoded UTF-8 are rejected. Browser textareas may normalize line endings, so this is not byte-exact file encryption. Limits are 262,144 UTF-16 code units for plaintext, 1,500,000 for a package and 1,024 for a passphrase. Long input and higher iteration counts take more time.

Browser processing, copying and clearing

Use HTTPS and a browser with Web Crypto. The conversion functions do not submit text or passphrases to a server or save them in browser storage, but shared website resources and scripts still load. This is not an offline or isolated environment guarantee. Copy transfers the current result. Clear removes the passphrase, both inputs and the result, but cannot clear clipboard history or guarantee erasure from memory. Edits discard pending results; a running native operation may still need time to finish.