Text Encrypter
Developer Tools · Added
Turn a message into a block of Base64 that only your passphrase reopens, using the browser's own Web Crypto implementation of AES-256-GCM. The block carries its own salt, initialisation vector and key-derivation cost, so a message encrypted today still opens years from now, on another machine, whatever this page does next. One thing is worth being blunt about: the passphrase is the entire security of the message.
How to use the text encrypter
- 1Choose Encrypt, type or paste your message, and pick a passphrase — several unrelated words beat one clever word.
- 2Press Encrypt and wait for the short pause while the key is derived.
- 3Copy the whole Base64 block, every line of it, and send it however you like.
- 4To read one, choose Decrypt, paste the block, enter the passphrase and press Decrypt.
Examples
A short note
- Input
- A 32-character message with a four-word passphrase
- Result
- A 117-character Base64 block over two lines
Overhead is fixed: 37 bytes of header plus a 16-byte authentication tag, so short messages look proportionally larger.
A wrong passphrase
- Input
- The correct block, one character different in the passphrase
- Result
- A refusal to decrypt — never partial or garbled output
An altered message
- Input
- The correct passphrase, with six characters of the block edited
- Result
- The same refusal: AES-GCM authenticates, so tampering fails the check a wrong passphrase fails
About the text encrypter
Why the parameters travel with the message
A passphrase is not a key. Turning one into a 256-bit AES key needs a salt and a cost setting, and decryption needs the exact same values — which means they have to be stored somewhere. Tools that hard-code them break the day the defaults change: raise the iteration count and every message written under the old number becomes unreadable.
So the block here describes itself. It states its format version, the iteration count that derived its key, its salt and its vector, before a single byte of ciphertext. Nothing about opening an old message depends on a default in today's code matching the default in the code that wrote it.
The salt is what stops one precomputed table attacking every message at once, and it is random per message rather than per passphrase. The vector is random per message for a stricter reason: reusing one with the same key in GCM does not merely weaken the encryption, it can expose the authentication key outright.
Authenticated encryption, and why it refuses
Older tools often used AES-CBC, which encrypts but does not authenticate. Feed one a wrong key and it happily returns plausible-looking bytes; feed it a message an attacker has modified and it returns the modification without comment. A whole family of padding-oracle attacks lives in that gap.
GCM closes it by computing an authentication tag over the ciphertext and checking that tag before returning anything at all. That is why this page has exactly two outcomes — the original message, or a refusal. It is also why the refusal is worded as it is: the check that failed cannot report which of its two possible causes applied.
The passphrase is the whole of it
Everything above concerns bytes an attacker can see. What actually decides whether a message stays private is how the passphrase was chosen, because an offline attacker does not attack the cipher — they guess, in order of likelihood, as fast as the key derivation lets them.
The strength meter on this page measures the size of the keyspace implied by the character sets you used. It cannot tell whether the phrase already sits in a word list, and it will happily rate a famous example passphrase highly. Treat it as a floor rather than a verdict, and remember there is no reset link here: lose the passphrase and the message is gone.
Frequently asked questions
How strong is this, honestly?
What exactly is in the output block?
Is any of this sent to a server?
Why can it not say whether the passphrase was wrong or the message was damaged?
When should I not use a page like this?
Related tools
Hash Generator
Developer Tools
Generate SHA-256, SHA-384, SHA-512 or SHA-1 digests of text or a file, and verify a checksum.
Password Generator
Developer Tools
Generate a strong random password with your own length and character rules, and see its real entropy.
HMAC Generator
Developer Tools
Compute a keyed HMAC over a message with SHA-1, SHA-256, SHA-384 or SHA-512.
ASCII Table
Developer Tools
Searchable ASCII reference with decimal, hex, octal, binary and escapes.