Encrypt and Decrypt Text with a Password
Encrypt text with a password into one line you can paste anywhere, and decrypt it with the same password
Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.
Did this tool do the job?
Thanks, your feedback came through.
How it works
Paste your text into the left pane, leave the direction on Encrypt and type a password; the encrypted string appears in the right pane. Encrypting a note such as "safe code 4821" gives you a single line of a hundred-odd characters beginning with QUtUWFQx, which you can paste into a chat message, an e-mail or a cloud note, because to anyone without the password it is a meaningless run of characters. To read it back, open this page, switch the direction to Decrypt, paste the string and type the same password. Send the password through a different channel from the string itself: if the string travels by e-mail, say the password over the phone. Note that the password box on this page shows what you type — it is an ordinary text field, not a browser password field — so take that into account if anyone can see your screen. Encryption and decryption run entirely inside your browser; neither the text nor the password is sent to any server.
This tool is also known as encrypt text with password, decrypt text online, aes 256 text encryption, encrypt a message, password protect text, encrypt notes offline.
What is AES-GCM?
AES-GCM is a mode of operation that combines counter-based AES encryption with an integrity check. While encrypting, an authentication tag is computed alongside the content and appended to the output; decryption verifies that tag first and returns nothing if it does not hold. In practice that means altering one character of the string, or supplying the wrong password, yields a clear error instead of half-decrypted nonsense. Confidentiality and proof of no tampering are delivered in the same step.
What is PBKDF2?
PBKDF2 is the standard way of turning a password a human can remember into an encryption key. The password is combined with a salt and run through a hash function hundreds of thousands of times — 600,000 rounds on this page. The cost you pay once on your own device is paid again by an attacker for every single guess in a brute-force run. The round count is written into the header of the encrypted string, so raising it later leaves older strings decryptable with their own count.
What is Salt?
The salt is the random value mixed into the password during key derivation; it is 16 bytes here and travels in the clear inside the encrypted string. It does not need to be secret, only unique. Its job is to make precomputed password-to-key tables useless: without a salt, an attacker could derive the keys of common passwords once and try them against everybody's data. Because the salt is generated at random, the same password produces a different key in a different session.
What is IV (initialisation vector)?
The IV is a 12-byte random value that makes each encryption start from a different point; like the salt it travels in the clear inside the string. The rule that matters is this: the same IV must never be used twice with the same key, or AES-GCM loses its confidentiality guarantee. A fresh IV is therefore generated for every encryption. What you see as a result is that encrypting the same text twice with the same password gives two strings with no visible resemblance, both of which open with that password.
How is encrypting text different from encrypting a file?
The cryptography is the same in both: AES-256-GCM with a key derived from your password through PBKDF2. What differs is how the result travels. This page takes text and returns text — one line you can paste straight into a message, the body of an e-mail, a note app or a configuration file. The file encryption tool takes files and returns a downloadable .enc file, encrypts the file name along with the content, and accepts up to 512 MB. Sending a short secret inside a message is the job of this page; sending a document as an attachment is the job of the file page. The two formats are not interchangeable: a string made here will not open on the file page, and if you try, the message tells you which page to use.
Why the output is one line of text instead of a file
Encrypted data is binary: it breaks when pasted, snags on line endings and gets truncated on the way. So the result is wrapped in Base64 and handed to you as a single line. The QUtUWFQx at the start is constant — it is this tool's own header in encoded form, and it tells you the line belongs to this page. The header also records the number of key-derivation rounds used, which means the count can be raised later without stranding the strings you produce today.
Copy the whole line when you move it. Losing a single character from either end makes decryption fail — not a flaw but a deliberate property: GCM mode verifies integrity before it returns anything, so altered data produces an error rather than half-correct text. Spaces, quotes and line breaks are stripped before decoding, so the line wrapping that chat apps insert does no harm.
The password is visible, and there is no way back without it
The password box on this page is not masked with dots; what you type can be read off the screen. That comes from the tool bench using one kind of text field, and we would rather state it than hide it. In practice: do not use this page where someone can look over your shoulder, while sharing your screen, or on a shared computer. The password itself is never transmitted — it lives in the browser's memory and disappears when you close the tab.
The second point is that there is no recovery. If you forget the password there is no known way to open the string; no back door, no recovery question, no copy held by us. When you encrypt something you intend to keep, store the password in a password manager. Password strength matters too: key derivation slows every guess down, but a birth date or a single dictionary word remains guessable. Use a random password of at least 12-16 characters.
- Good for: a note, an address, a code, a short secret, one line to send by e-mail
- Not for: shared computers, calls with your screen shared, long documents (encrypt those as files)
Frequently asked questions
How does the recipient decrypt the string?
Send them this page's address and the password; no software or account is needed. They open the page, switch the direction to Decrypt, paste the string and type the password. Do not send the password through the same channel as the string.
Why does encrypting the same text twice give different output?
A random starting value (IV) is generated for every encryption and written into the string, so the output looks different each time. Both versions open with the same password. This is deliberate: identical input always producing identical output would let an observer tell that two messages are the same.
Can you recover my text if I forget the password?
No. Encryption runs on your device, the password never reaches us, and the format has no back door. There is no known practical way to open an AES-256 encrypted string without its password — a lost password means lost content.
What happens if I type the wrong password?
Decryption fails and you get a single error message. That message deliberately does not distinguish between a wrong password and an altered string: telling the two apart would hand a clue to anyone guessing. Wrong passwords never produce partial or garbled text.