Skip to main content
DigiToolBay
Data and Security ToolsClient-Side Browser Processing

Text Encryption & Decryption

Encrypt and decrypt text locally using Web Crypto AES-256-GCM with PBKDF2-SHA256 key derivation.

Loading Text Encryption & Decryption...

Uses browser Web Crypto AES-256-GCM + PBKDF2; no third-party security audit claimed.

By DigiToolBay Editorial TeamPublished & verified:

About Text Encryption & Decryption: Guide & Practical Notes

Sending a sensitive Wi-Fi key, configuration secret, or private note over an ordinary messaging channel exposes plaintext permanently—unless you encrypt it first with authenticated browser cryptography.

Encrypts and decrypts UTF-8 text locally using the native Web Crypto API: **PBKDF2-HMAC-SHA256** (310,000 iterations with a fresh random 16-byte salt) deriving a 256-bit key for **AES-256-GCM** authenticated encryption (with a fresh random 12-byte IV per message).

How to Use Text Encryption & Decryption Step by Step

  1. Enter a strong Passphrase (share this passphrase via a separate secure channel from the encrypted output).
  2. Type plaintext and click Encrypt (AES-256-GCM) to produce a self-contained JSON ciphertext envelope (`v`, `alg`, `kdf`, `iter`, `salt`, `iv`, `ct`).
  3. To decrypt later, paste the JSON envelope into Input, enter the same Passphrase, and click Decrypt.

Worked Example

Encrypt a short config note.

Inputs: Plaintext: "staging-db-port=5433" + strong passphrase

Result: {"v":1,"alg":"AES-256-GCM","kdf":"PBKDF2-SHA256","iter":310000,"salt":"...","iv":"...","ct":"..."}

AES-GCM provides both confidentiality and integrity authentication—tampering with any byte or using the wrong passphrase triggers an authentication failure.

Cryptographic Implementation & Honest Limitations

Uses standard browser `crypto.subtle` primitives (zero custom cipher code). Every encryption generates a fresh 128-bit salt and 96-bit GCM IV via `crypto.getRandomValues()`, preventing IV reuse. **Limitations:** overall security depends heavily on choosing an unguessable passphrase (weak short passphrases remain vulnerable to offline PBKDF2 brute-forcing), and this open utility has not undergone a formal third-party cryptographic security audit.

Common Real-World Uses

  • Protecting temporary snippets with a shared high-entropy passphrase before pasting in chat
  • Demonstrating authenticated Web Crypto AES-256-GCM + PBKDF2 key derivation
  • Decrypting messages encrypted with this exact envelope format offline

Common Mistakes to Avoid

  • Sending the encrypted payload and the passphrase in the exact same Slack message or email.
  • Choosing a weak 6-letter passphrase (making offline dictionary guessing feasible).

Supported Formats, Scope & Limitations

If you lose or mistype the passphrase, decryption is mathematically impossible—DigiToolBay stores neither keys nor ciphertexts. No independent security audit is claimed.

Privacy & Local Processing

All key derivation, random salt/IV generation, encryption, and decryption run strictly inside browser SubtleCrypto.

Frequently Asked Questions

Why does encrypting the same text twice produce different ciphertext?

Because every encryption generates a brand-new random 16-byte salt and 12-byte IV, preventing pattern leakage and catastrophic GCM nonce reuse.

Can DigiToolBay recover my text if I forget the passphrase?

No. Nothing is transmitted or stored anywhere, and without the exact passphrase AES-256-GCM cannot decrypt.

Need a strong random passphrase to pair with this tool? Generate one in our Password Generator.