Text Encryption Tool (AES-256): Lock a Message With a Password

Turn a message into scrambled text that only the right password opens, then turn it back. Your browser does the encryption and nothing is uploaded.

TechFreeNo sign-upWorks on phones
Result

0Characters in
0Characters out
–Last action

A classroom and everyday privacy tool. For anything that really matters, such as legal, medical or financial records, use a well-known, independently reviewed encryption app.

This tool runs in your browser. Nothing you type is uploaded or saved, and there is nothing to install or sign up for.

What this tool does with your message

Encryption scrambles a message so thoroughly that it reads as noise to everybody except the person holding the key. Here the key is made from a password you choose. You type a message, press a button and get a block of letters and digits that is safe to paste into an email, a chat or a shared document. Whoever receives it pastes the block into this same page, types the password and reads the original.

The work is done by the encryption engine built into your own browser. The message, the password and the result stay on your device: this page has no server component that could receive them.

Locking and opening a message

To encrypt

  1. Type or paste the message in the top box.
  2. Type a Password. Longer is better, and several unrelated words work well.
  3. Press Encrypt. The locked text appears in the dark panel.
  4. Press Copy result and send the locked text. Tell the other person the password by a different route, for example in person or by phone.

To decrypt

  1. Paste the locked text in the top box. Line breaks and spaces added by an email program are ignored.
  2. Type the same password, with the same capitals and spaces.
  3. Press Decrypt to see the opened message.

Move result to the input box saves a copy-and-paste when you want to check that a message opens again. Clear all empties both boxes, and Reset reloads the sample.

A sample you can check yourself

The page opens with the message The science fair is on Friday, 29 characters long, and the password blue kite 42. Pressing Encrypt produces 100 characters of locked text. Press it again and you get a different 100 characters, because fresh random values go into every encryption. Both versions open with the same password.

Here is one locked version of that sample. Paste it into the top box, keep the sample password and press Decrypt, and the science fair sentence comes back:

ISIjJCUmJygpKissLS4vMEZHSElKS0xNTk9QUXctEFtknqMklpvD9ZJdbW7HXwYkpAOERK3nN2i584FCg3+n322yz/lEM4b0gA==

Change a single letter of the password, say to blue kite 43, and the page reports that the text did not open. No partly readable message is shown. It is all or nothing.

How the encryption works

Three standard building blocks are used, all supplied by the browser’s Web Crypto feature:

  • PBKDF2 with SHA-256 stretches your password into a 256-bit key. It repeats its calculation 250,000 times on purpose, so that each guess costs an attacker real computing effort. A random 16-byte value called a salt is mixed in, which means the same password gives a different key for every message.
  • AES-256 does the scrambling. AES is the Advanced Encryption Standard published by the US National Institute of Standards and Technology, which defines key sizes of 128, 192 and 256 bits (NIST, FIPS 197, read December 2026). This page uses the 256-bit size.
  • GCM mode adds a 16-byte check value to the result. If even one character of the locked text is changed on the way, the check fails and the page refuses to open it. A random 12-byte starting value is generated for each encryption.

The locked text is those pieces joined together and written in Base64, an alphabet of letters, digits, plus and slash that survives copying:

locked text = Base64( salt 16 bytes + starting value 12 bytes + scrambled message + check 16 bytes )

That fixed overhead of 44 bytes explains the lengths you see. A 29-byte message becomes 73 bytes, and Base64 turns every 3 bytes into 4 characters, rounding up to a multiple of four: 100 characters. A 5-byte message such as hello becomes 49 bytes and 68 characters. Accented letters and emoji take more than one byte each, so they lengthen the result a little more.

Honest limits

  • The password is the weak point. AES-256 itself is not what an attacker goes after. A short or guessable password can be found by trying likely candidates, however strong the cipher is. Test your style of password with the password strength checker, or let the password generator make one.
  • A lost password means a lost message. There is no back door, no reset link and no copy kept anywhere.
  • Length is not hidden. Anyone who sees the locked text can estimate how long the message is.
  • Your device still matters. Encryption protects the message on its journey. It does not help if somebody can read your screen or if the device itself is compromised.
  • Text only. Files and pictures are outside the scope of this page.
  • Browser support. Browsers generally offer Web Crypto only on pages loaded over https. If it is missing, the page says so and does nothing.

Use this for homework answers, surprise plans and everyday notes. For anything where a mistake would be serious, choose an established encryption program that security specialists have reviewed.

Ideas for class and everyday use

In a computing or math lesson, pair this tool with a classical cipher. Let students encode a sentence with the Caesar cipher and break it by trying all 25 shifts, then lock the same sentence here and discuss why trying every key is no longer possible. The comparison shows the difference between hiding a message and protecting it.

Encoding is a third idea that is often confused with the other two. The Base64 encoder turns text into the same kind of alphabet you see in the locked result, but with no password at all, so anybody can reverse it. A hash generator goes one way only and is used for checking, not for sending messages.

For everyday use, agree on the password face to face before you need it, and never send it in the same message as the locked text. Other privacy and code helpers are listed with the tech and web tools, and the main page of free online tools has the rest.

Frequently asked questions

Is my message sent to a server when I encrypt it?

No. The encryption runs in your browser using its built-in Web Crypto feature. The message, the password and the result stay on your device.

What happens if I forget the password?

The message cannot be opened. Nothing is stored anywhere and there is no reset option, so keep the password somewhere safe if the message matters.

Why does the same message give a different result each time?

Every encryption uses a fresh random salt and starting value. The sample message always produces 100 characters, but the characters differ on each press, and every version opens with the same password.

How secure is AES-256 with a password?

The cipher is a published standard with a 256-bit key, but the real strength depends on your password. A short or common password can be guessed, so use a long one made of unrelated words or random characters.

Can I decrypt text that was encrypted by another app?

Usually not. Each tool packs the salt, starting value and scrambled data in its own layout. This page opens text in its own layout: Base64 of a 16-byte salt, a 12-byte starting value and the AES-GCM output.

Why do I get a message saying it did not open?

Either the password differs from the one used to lock the text, including capitals and spaces, or the locked text was changed or cut short while copying. Paste it again in full and retype the password.

Related tools

Browse all free tools →