DevTulz Online

Text Encryption Tool

All encryption is performed locally in your browser using the Web Crypto API. Your data never leaves your device.

What is Text Encryption?

Text encryption transforms readable plaintext into unreadable ciphertext using a cryptographic algorithm and key. Only someone with the correct key can decrypt it back. The supported algorithms are: AES-GCM (authenticated encryption — detects tampering, recommended for new projects), AES-CBC (widely supported older mode), AES-CTR (stream cipher mode), and RSA-OAEP (asymmetric encryption using a public key). AES uses a symmetric key (same key to encrypt and decrypt). RSA uses a public key for encryption and a private key for decryption, allowing secure transmission without sharing a secret.

Supported Algorithms:

Symmetric Encryption (AES):

  • AES-GCM (Recommended): Provides authenticated encryption with associated data (AEAD). Most secure for general use.
  • AES-CBC: Traditional block cipher mode. Requires padding.
  • AES-CTR: Counter mode. Converts block cipher to stream cipher.

Asymmetric Encryption (RSA):

  • RSA-OAEP: Uses public key for encryption. Limited to ~190 characters due to key size constraints. Use for encrypting small data or symmetric keys.

Output Format:

For AES algorithms: JSON with base64-encoded components

{"iv": "base64_encoded_iv", "data": "base64_encoded_ciphertext"}

For RSA: Base64-encoded ciphertext only (no IV needed)

base64_encoded_ciphertext

This format is compatible with most encryption/decryption tools and libraries.

How to Use the Text Encrypt Tool

  1. Enter the text you want to encrypt in the input field.

  2. Select the encryption algorithm (AES-GCM is recommended).

  3. Enter a secret key (for AES) or paste a public key in PEM format (for RSA-OAEP).

  4. Click Encrypt — the ciphertext appears as a Base64-encoded string.

  5. Copy the ciphertext to transmit or store it securely.

Additional Tips:

  • For AES: The secret key is auto-generated or you can provide your own (minimum 32 characters)
  • For RSA: You need a public key in PEM format. Generate one using the Key Generator tool or OpenSSL
  • RSA limitations: Can only encrypt short text (~190 characters). For longer texts, use AES algorithms
  • Output encoding: Base64 is used for compatibility with other encryption tools and libraries

Security Notes

This tool uses the browser's native Web Crypto API for strong encryption. AES-GCM provides authenticated encryption with associated data (AEAD), making it the recommended choice for most applications. AES-CBC provides traditional block cipher encryption. Always keep your secret key secure and never share it publicly. The encrypted output includes both the initialization vector (IV) and encrypted data in JSON format.

Important Notes:

  • All encryption happens locally in your browser using the Web Crypto API
  • The IV (Initialization Vector) is automatically generated for each encryption and must be saved with the ciphertext
  • For RSA encryption, you encrypt with a public key; decryption requires the corresponding private key
  • Store your secret keys securely - if lost, encrypted data cannot be recovered
  • Base64 encoding makes the output portable and compatible with most tools and programming languages

This text encryption tool uses the Web Crypto API built into your browser — all encryption happens locally and your data and keys are never transmitted. The ciphertext includes the IV/nonce needed for decryption. Use the Text Decrypt tool to reverse the process.

Need to decrypt text? Try our Text Decryption Tool →

Frequently Asked Questions

How secure is AES-256-GCM? AES-256-GCM is considered military-grade encryption. No known practical attacks against properly implemented AES-256-GCM exist. The security depends entirely on key secrecy and randomness — a weak or predictable key is the most likely point of failure, not the algorithm itself.

What should I use as an AES key? Use a long, random key — at least 32 characters combining uppercase, lowercase, numbers, and symbols. Or use a key derived from a password using PBKDF2 or Argon2 with a random salt. Never use dictionary words or predictable strings as encryption keys.

Can I encrypt files with this tool? This tool is designed for text strings. For encrypting files, use dedicated tools that handle binary data and file streams. The encryption algorithms are the same — only the data handling differs.

Keywords: text encryption online, AES encryption, encrypt text, AES-GCM, AES-CBC, secure text encryption, free encryption tool, Web Crypto API encryption, client-side encryption