Security Tools
Text Encryption
Encrypt and decrypt text with a passphrase in your browser. AES-GCM-256 with PBKDF2 key derivation. No upload, no signup, no account.
Plain text
0 characters | 0 B as UTF-8
The same passphrase is required to decrypt. Aim for 16+ characters of mixed words and symbols.
Output format
Base64 is shorter and friendlier for email or chat. Hex is easier to inspect and is used by some scripting environments.
Higher values slow down brute-force attempts on the same hardware. The same value must be used for encrypt and decrypt.
How the encryption works
Key derivation
Your passphrase is run through PBKDF2-HMAC-SHA-256 with a fresh random salt and a configurable iteration count. The result is a 256-bit AES key that exists only in memory.
Authenticated encryption
The text is encrypted with AES-256-GCM using a fresh random 12-byte IV. GCM produces a 16-byte authentication tag that detects any change to the ciphertext during decryption.
Self-contained envelope
The salt, IV, and ciphertext-with-tag are concatenated and encoded as base64 or hex. The recipient does not need any extra files; the passphrase and iteration count are enough.
Browser-only
Crypto runs in window.crypto.subtle on your device. The plain text, passphrase, and ciphertext never leave this tab and are not stored after the page is closed.
Strength depends on your passphrase. A short or guessable passphrase can be brute forced offline against the public envelope. Use a long, unguessable passphrase for anything sensitive.
How to use
- Pick Encrypt or Decrypt at the top.
- In Encrypt mode, paste or type the message you want to protect, enter a long passphrase, and pick base64 or hex output. Choose an iteration count (250,000 by default; 600,000 matches recent OWASP guidance).
- Click Encrypt and copy the resulting envelope. It contains the salt, IV, ciphertext, and authentication tag in a single base64 or hex string.
- To recover the message, open Decrypt, paste the envelope, enter the same passphrase, and use the same iteration count. The original text appears once the GCM tag is verified.
- Share the passphrase and iteration count out of band (different channel, ideally face to face or by phone). Anyone with the envelope and the passphrase can decrypt the message.
About this tool
Text Encryption is a browser-only tool for protecting a piece of text with a passphrase using AES-256-GCM, the same authenticated encryption mode used by TLS 1.3 and most modern protocols. The Encrypt mode takes your plain text and a passphrase, generates a fresh random 16-byte salt and 12-byte IV with the browser CSPRNG, derives a 256-bit AES key using PBKDF2-HMAC-SHA-256 (default 250,000 iterations, with presets up to 1,000,000 for stronger offline-attack resistance), encrypts the text, and produces a single self-contained envelope laid out as salt then IV then ciphertext with the 16-byte GCM authentication tag. The envelope is shown as base64 (shorter, friendlier for email and chat) or hex (easier to inspect, drops cleanly into shell scripts), and a Copy button copies the whole string in one click. The Decrypt mode accepts the envelope plus the same passphrase and iteration count, parses the salt and IV out of the header, derives the same key, and verifies the GCM tag before returning any text. Wrong passphrase, mismatched iterations, or any tampering with the ciphertext all surface as a single decryption error so partial output never leaks. Useful for sending a one-off secret note over email or chat without setting up PGP, sharing API keys or temporary credentials with a teammate, encrypting a passage of personal notes before pasting it into a sync service, double-protecting recovery phrases or codes you keep in a password manager, or just verifying that your platform's crypto primitives behave the way you expect. Strength depends on the passphrase. A short or dictionary-based passphrase can be brute forced offline against the public envelope, even with high iteration counts. Pair this tool with the related Passphrase Generator (long random word lists) or Password Generator (high-entropy random strings) to build a passphrase that is hard to guess. Everything runs in window.crypto.subtle on your device. Plain text, passphrase, and ciphertext never leave the page and are not stored after the tab closes.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Passphrase Generator
Random-word passphrases with live entropy and crack-time estimates.
Open tool
SecurityPassword Generator
Strong random passwords with length and character controls.
Open tool
SecurityPassword Strength Checker
Live strength meter with entropy, crack times, and common-password detection.
Open tool
SecuritySHA-256 Hash Generator
Hash text or files with SHA-1, SHA-256, SHA-384, and SHA-512.
Open tool
SecurityHMAC Generator
Generate and verify HMAC-SHA1, SHA-256, SHA-384, and SHA-512 signatures.
Open tool