Skip to main content

Text Encryption & Decryption

Encrypt text with AES-GCM or decrypt supported legacy ciphertext

AES-GCM protects confidentiality and detects changes. A fresh salt and nonce are generated for each result; keep your passphrase because it cannot be recovered.

The passphrase and text stay in this tab only and are not saved to browser storage.

Maximum plain text: 1,000,000 characters.

Result

Your encrypted or decrypted text will appear here after you run the operation.

Was this Text Encryption & Decryption helpful?

Help us keep tools reliable, fast, and bug-free.

What you can do with Text Encryption & Decryption

  • Encrypt text with aes-gcm
  • Decrypt legacy ciphertext

How this text processing works

Encrypt text with password-derived AES-256-GCM or decrypt supported legacy ciphertext in the browser.

Example input

Text: EasyUtils sample, passphrase: demo-passphrase, algorithm: AES-GCM, action: Encrypt

Example output

EU-GCM:v1:AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGwX+vjsh4AXwssUGnHWWj+x0PjB5+U5G1c31fxn9kOpZ

Practical workflow

  1. Choose Encrypt for new data; AES-GCM is the only algorithm enabled for encryption.
  2. Enter a strong passphrase and the text to protect, then choose Encrypt. The tool derives an AES-256 key with PBKDF2-HMAC-SHA-256 and creates a fresh salt and nonce.
  3. Copy the EU-GCM:v1 ciphertext and store it with the passphrase through your own secure channel.
  4. To recover text, choose Decrypt, paste the versioned ciphertext, enter the same passphrase, and choose Decrypt. Select a legacy algorithm only for matching older ciphertext.

Common use cases

  • Encrypt short text snippets with authenticated AES-GCM before copying them into a trusted storage workflow.
  • Check that a saved EasyUtils EU-GCM:v1 message decrypts with its original passphrase.
  • Inspect legacy AES, DES, TripleDES, Rabbit, RC4, or RC4Drop ciphertext that must remain readable.

Important notes and limitations

  • Text and passphrase are processed in browser memory and are not stored in local storage. New encryption uses Web Crypto AES-256-GCM, a random 16-byte salt, a random 12-byte nonce, a 128-bit authentication tag, and PBKDF2-HMAC-SHA-256 with 600,000 iterations.
  • Each result starts with EU-GCM:v1: followed by Base64 of salt, nonce, and authenticated ciphertext. Keep the passphrase separately; it cannot be recovered from the output.
  • The legacy choices only decrypt compatible old output. Legacy AES may use ECB or CBC with configurable key size and Base64 or hex input; these modes do not authenticate ciphertext. DES, TripleDES, Rabbit, RC4, and RC4Drop are obsolete and must not be used to protect new data.
  • This tool encrypts text, not files. A long passphrase is important because anyone who obtains the ciphertext can try guessing it offline.
  • Plaintext is limited to 1,000,000 UTF-16 code units, ciphertext input to 6,000,064 characters, and decrypted plaintext to 1,000,000 code units; oversized values are rejected.

OpenSSL & Node.js cryptographic primitive commands

Generate cryptographically secure 256-bit key

openssl rand -hex 32

Generates 32 random bytes (256 bits) from the operating system's CSPRNG (/dev/urandom) encoded as hex.

Calculate HMAC-SHA256 signature

echo -n 'payload data' | openssl dgst -sha256 -hmac 'my-secret-key'

Computes a keyed-hash message authentication code to verify both data integrity and authenticity.

Generate RSA 4096-bit private key

openssl genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits:4096

Creates an unencrypted 4096-bit RSA private key for asymmetric encryption and digital signatures.

Cryptographic Primitives & Cipher Modes Comparison

Algorithm / CipherTypeKey SizeAuthenticationPrimary Application
AES-256-GCMSymmetric Authenticated Stream256-bitIntegrated 128-bit GHASH tagTLS 1.3, modern database field encryption, secure file storage
AES-256-CBCSymmetric Block Cipher256-bitNone (Vulnerable without separate HMAC)Legacy compatibility; requires PKCS#7 padding
ChaCha20-Poly1305Symmetric AEAD Stream256-bitIntegrated Poly1305 MACWireGuard VPN, mobile TLS where AES-NI hardware is absent
RSA-4096Asymmetric Public Key4096-bitDigital signatures (PKCS#1 / PSS)SSL/TLS root certificates, SSH host keys, GPG identities
Ed25519 (EdDSA)Asymmetric Elliptic Curve256-bit curveDeterministic signatureModern SSH keys, cryptocurrency wallets, Git commit signing

Cryptographic implementation & padding troubleshooting

Ciphertext verification failed / invalid authentication tag

Cause: In AEAD ciphers (AES-GCM, ChaCha20-Poly1305), modifying even a single byte of ciphertext or IV causes the tag check to fail.

Solution: Verify that ciphertext and initialization vector (IV) have not been corrupted or truncated in transit.

Catastrophic security failure: Nonce / IV reuse in AES-GCM

Cause: Using the same 12-byte initialization vector with the same secret key across multiple encryptions allows an attacker to recover plaintext and forge messages.

Solution: Always generate a cryptographically random 12-byte IV (via crypto.getRandomValues) for every single AES-GCM encryption.

PKCS#7 padding error during CBC decryption

Cause: Incorrect key or corrupted final block prevents removal of PKCS#7 padding bytes.

Solution: Never expose raw padding error details to web clients; padding oracle attacks can decrypt CBC payloads.

Continue your workflow

  • File Encryption — Encrypt and decrypt confidential files in-memory using 256-bit AES-GCM.
  • Hash Generator — Compute cryptographic hashes and HMAC signatures across standard digest algorithms.
  • JWT Debugger — Inspect, verify, and generate JSON Web Tokens signed with HMAC, RSA, or ECDSA.
  • SSL Certificate Generator — Generate self-signed X.509 certificates and private keys with SAN extensions.

Frequently asked questions

What format does new AES-GCM encryption produce?

New output starts with EU-GCM:v1: and contains a random salt, nonce, and authenticated AES-256-GCM ciphertext encoded as Base64. The format version allows later readers to identify its parameters.

Can I recover a forgotten passphrase from the ciphertext?

No. The passphrase is not included in the EU-GCM:v1 output. If it is lost, the authenticated ciphertext cannot be decrypted.

Why does AES-GCM report an authentication failure?

The passphrase may be wrong, the ciphertext may be truncated or changed, or the text may use a different format. AES-GCM verifies the authentication tag before returning any plaintext.

Can the legacy algorithms encrypt new messages?

No. DES, TripleDES, Rabbit, RC4, RC4Drop, and the legacy AES modes are exposed only to decrypt compatible old data. Choose AES-GCM for new text encryption.

Is text saved when I use this tool?

The current tool keeps the passphrase and text in page memory and does not save them to local storage. Closing or reloading the tab clears the current input state.

Focused guides for this tool