Skip to content

Text encryption: encrypt and decrypt with a password

Turn a message into unreadable text that only someone with the password can open, then send it through email, chat or a shared document. Paste the encrypted text back here with the same password to read it again. Small files can be locked the same way. Everything happens in your browser with the Web Crypto API built into it: the text, the file and the password never reach our server.

Quick answer

Choose Encrypt, type or paste your text, enter a password twice and press Encrypt. Copy or download the result. To read it, choose Decrypt, paste the encrypted text, enter the same password and press Decrypt.

Based on OWASP Password Storage Cheat Sheet (PBKDF2-HMAC-SHA256: 600,000 iterations) · Page updated 23 October 2026

Editor: Abuzar, founder of NeedMyToolsHow we check facts

There is no way to recover a forgotten password. Use a long passphrase and send it separately from the message.

Encrypted result

The result appears here.

AES-256-GCM, key from PBKDF2-SHA-256 with 600,000 rounds and a random 16-byte salt, random 12-byte IV, through your browser's Web Crypto API. Nothing is uploaded.

How to use the Encrypt and Decrypt Text

  1. Choose Encrypt, then Text or File, and paste the message or pick the file.
  2. Enter a long password twice and press Encrypt. Copy the encrypted text or download the .txt or .nmtenc file.
  3. To open it, choose Decrypt, paste the text or pick the file, enter the same password and press Decrypt.

What happens when you press Encrypt

First a key is made from your password. Passwords are short and guessable, so they are stretched with PBKDF2, a standard key-derivation function, using HMAC-SHA-256, a random 16-byte salt and 600,000 rounds, the figure the OWASP Password Storage Cheat Sheet gives for PBKDF2-HMAC-SHA256. The salt means the same password gives a different key each time, and the rounds make every password guess slow. The 256-bit key then encrypts your text with AES in Galois/Counter Mode (GCM), using a random 12-byte initialisation vector, the 96-bit length the GCM specification recommends. GCM also adds a 16-byte tag that detects any change to the result.

Reading the encrypted text

The output is one line of seven parts separated by dots: nmt1 (the format version), aes256gcm, pbkdf2sha256, the number of rounds, then the salt, the IV and the encrypted data with its tag, each in Base64. Nothing in it is secret except the data, and nothing in it reveals the password. The first four parts are bound into the encryption as additional authenticated data, so changing the round count or any character makes decryption fail instead of giving wrong text. Line breaks or spaces added by chat apps are ignored when you paste it back. Because the format is written out in full, anyone can decrypt it with standard Web Crypto code; the page does not depend on our server.

Wrong password and other errors

AES-GCM cannot tell a wrong password from changed data: in both cases the tag does not match and nothing is decrypted. The page then says the password is wrong or the text was changed, and shows no partial output. Other messages explain a string that is not in this format, a version this page does not know, or a round count outside the safe range of 100,000 to 5,000,000, which is refused so that a crafted string cannot freeze your browser. There is no way to recover a forgotten password: no back door exists, and we never see your password, so keep it somewhere safe.

Choosing a password and sharing safely

The encryption is only as strong as the password. Use a long passphrase of four or more random words, or a random password from our generator, and never the password of an account. Send the password by a different route from the message, for example the encrypted text by email and the password in person or by phone. For files, the same method is used and the result is saved as the original name plus .nmtenc; the file is read into memory, so very large files are limited to 200 MB. On a normal laptop the 600,000 rounds take a fraction of a second, which is deliberate: it costs you once and costs an attacker for every guess.

Sources and related tools

We opened the OWASP Password Storage Cheat Sheet and the MDN Web Docs pages for SubtleCrypto.deriveKey and AesGcmParams on 23 October 2026. This page uses only the browser's built-in Web Crypto functions; there is no custom cryptography. To make a strong password, use the password generator or passphrase generator; to check whether a password has appeared in a breach, use the password breach checker.

Frequently asked questions

Is this text encryption tool secure?

It uses AES-256-GCM with a key made by PBKDF2-SHA-256 over 600,000 rounds, all through the browser's standard Web Crypto API. The weak point is the password, so choose a long, unique one.

What happens if I forget the password?

The text cannot be decrypted. There is no reset or back door, and the password is never sent to us, so nobody can recover it.

Why does decryption say the password is wrong when it is right?

The encrypted text was probably changed or cut short when it was copied. Make sure all seven dot-separated parts were pasted, from nmt1 to the end.

Is encryption the same as Base64 encoding?

No. Base64 only rewrites data in letters and digits, and anyone can reverse it. Encryption needs the password to reverse. The output here uses Base64 only to carry the encrypted bytes as text.

Can someone decrypt my text without this website?

Yes, with the password. The format names every setting (AES-256-GCM, PBKDF2-SHA-256, round count, salt and IV), so standard crypto code in any language can open it.