Security

What Encrypting Text in Your Browser Does and Does Not Protect

A passphrase-encrypted note is unreadable to anyone without the passphrase. That is the whole promise, and it is narrower than it sounds.

A sealed block with a padlock on it; above it two address lines and below it a length bar stay in plain view, and a dashed screen with an eye sits beside it.

Encrypting text with a passphrase protects the content of that text from anyone who does not have the passphrase, whether they read it on a server, in a mailbox or on a backup. It does not hide that a message exists, who sent it or roughly how long it is, and it does nothing against a passphrase that is easy to guess or a screen someone else can see. Those limits matter more than the cipher does.

What exactly gets protected?

The text encryption tool here does four things in your browser. It draws a random 16-byte salt and a random 12-byte nonce. It stretches your passphrase into a 256-bit key with PBKDF2-HMAC-SHA-256 over 250,000 rounds. It encrypts the UTF-8 text with AES-256-GCM. Then it packs the salt, the nonce, the round count and the ciphertext into one base64 block.

GCM also attaches a 16-byte authentication tag. That is why a block someone altered refuses to decrypt instead of producing garbage. Anyone who gets the block without the passphrase sees base64 and nothing they can use directly. That holds while the block sits in an email archive, a ticket, a chat history or a backup, which is why it suits a password or a recovery code that has to cross a channel that keeps records. The reasoning behind that is in how to send someone a password securely.

What does an encrypted block still reveal?

More than people expect, because only the message is scrambled. The wrapper around it is plain.

If the existence of the message is the secret, encryption alone does not solve it. If the exact length is the secret, pad the text yourself before encrypting.

How much does the passphrase matter?

It is the entire defence. Anyone holding the block can try passphrases offline, at whatever speed their hardware allows, for as long as they like, and nobody will be rate-limiting them. The 250,000 rounds make each try cost real work, but they only multiply the attacker's effort by a fixed factor. A dictionary word with a digit on the end falls anyway. A short passphrase is the weak link in every case.

PBKDF2 is also the weakest of the modern key-stretching functions. It needs little memory, so graphics cards run it efficiently, where Argon2 and scrypt are built to resist exactly that. Browsers expose only PBKDF2 through Web Crypto, so that is what the tool uses. How many guesses per second a specific attacker manages against it is not something this site has measured, and the honest answer for anyone's real adversary is that you do not know.

So the passphrase has to be long and chosen at random. Four or five words picked by dice or by software, not by you, is the usual advice, and password versus passphrase explains why words you choose yourself are far weaker than they feel. The password generator will produce a random string if you would rather not invent one, and how long it takes to crack a password shows what the arithmetic looks like. The tool itself warns you when the passphrase is under 12 characters.

What if the passphrase is lost?

The text is gone. There is no server holding a copy, no reset link and no recovery address, because there is no account. If the encrypted block is the only copy of something you need, keep the passphrase somewhere that survives a lost phone, such as a password manager.

A related failure is less obvious. Decryption fails the same way for a wrong passphrase and for a block altered in transit, and AES-GCM cannot say which. If a block you received will not open, a pasted block cut off at the end is a common cause, and it looks the same as a typo.

Can someone watch it happen?

Yes, and encryption is no help there. The message is plain text while you type it and plain text again after you decrypt it. A person behind you, a screen share, a screenshot tool, a browser extension with access to the page or malware on the machine all see it. The passphrase box hides its content by default, with a checkbox to show it, which only helps against a glance.

The result also passes through the clipboard when you copy it, and other programs on the same computer can often read the clipboard. The tool keeps nothing in storage, but the text stays in the boxes until you press Clear everything or close the tab.

What does it say about who wrote the message?

Nothing. A block that decrypts proves nobody changed it without the passphrase. It does not prove who wrote it, because everyone holding the passphrase can produce a valid block. That is the difference between encryption with a shared secret and a signature. For a conversation where identity matters, tools such as age, GPG or Signal handle both, and this one does not try to. It also handles text only, with no file mode.

When is it the right tool?

When you need to put a small secret somewhere that many people or systems can read, and you can give the passphrase to the right person by a different route. A password for a shared account, a recovery code, a note to yourself on a synced notepad. It is the wrong tool when the sender and recipient need deniability, when the file is large, or when you cannot get the passphrase to the other person separately.

If a small secret has to travel through a channel that keeps copies, the text encryption tool turns it into a block you can paste anywhere, with the key derived in your browser and nothing sent to a server. Choose the passphrase with the care the rest of this page argues for, and give it to the person another way.

The step that most often goes wrong is the handover itself. How to send someone a password securely covers what counts as a second channel and what does not.

Frequently asked questions

Does encrypting text in the browser hide that I sent a message?

No. Encryption scrambles the content only. The sender, recipient, time and subject of whatever carries the block stay visible, and so does the approximate length of the message, because AES-GCM does not pad. If the existence of the message is the secret, you need a different approach.

Can an encrypted block be cracked without the passphrase?

The cipher itself, AES-256, is not the weak point. The passphrase is: anyone with the block can guess passphrases offline with no limit on attempts, and the key stretching only makes each guess cost more. A long random passphrase holds up, and a short or guessable one does not.

What happens if I forget the passphrase?

The text cannot be recovered. Nothing is stored on a server, there is no account and no reset link, so no one can open the block for you. Keep the passphrase somewhere that survives losing your device.

Does a block that decrypts prove who wrote it?

No. It proves the block was not altered by anyone without the passphrase. Anyone who knows the passphrase can create a valid block, so it says nothing about who made it. A digital signature is the tool for that.

Last updated November 11, 2026