To encrypt text, paste it into Input Text, enter a password in Password and again in Confirm Password, then select Encrypt. The tool derives a 256-bit key from your password with PBKDF2 and encrypts the text with AES-GCM in your browser. Copy the token from Output Result; paste it back with the same password and select Decrypt to read it.
How to encrypt text with a password
- Add your text. Paste it into Input Text or use Load text file for a .txt, .json, .md, .log or .enc file.
- Set a password. Type it in Password and Confirm Password. A long passphrase works best; the strength bar gives a rough rating.
- Pick output and iterations. Choose Compact token or Readable JSON under Encrypt Output Format. PBKDF2 iterations starts at 600k, the OWASP recommendation; slide it higher for more protection against password guessing, or lower only for a slow device.
- Encrypt, then share or store. Select Encrypt and copy or download the output. To read it later, paste it in, enter the same password and select Decrypt.
How this text encryption works
Every encryption runs entirely in your browser through the Web Crypto API:
- A random 16-byte salt and a random 12-byte IV (nonce) are created with
crypto.getRandomValues(). - PBKDF2 with HMAC-SHA256 stretches your password and the salt into a 256-bit AES key, running 600,000 iterations by default.
- AES-256 in GCM mode encrypts the UTF-8 text. GCM also adds a 16-byte authentication tag, so any change to the ciphertext, or a wrong password, makes decryption fail instead of returning garbage.
A 12-byte (96-bit) IV is the length the AES-GCM specification recommends, and because salt and IV are fresh each time, encrypting the same text twice with the same password gives different output. The salt, IV and iteration count are stored in the output in plain view so decryption can repeat the same steps, which is safe because they don't need to be kept secret.
AES encryption online: what the output contains
Compact Token gives one line starting with TLABENC.v1., followed by base64url-encoded JSON. Readable JSON shows the same fields directly:
{
"v": 1,
"alg": "AES-GCM",
"kdf": "PBKDF2-SHA-256",
"iterations": 600000,
"salt": "...16 bytes, base64url...",
"iv": "...12 bytes, base64url...",
"ciphertext": "...ciphertext + tag, base64url...",
"createdAt": "2026-10-11T09:30:00.000Z"
}The format uses standard algorithms, so you can decrypt it without ToolzyLab. In Python with the cryptography package:
import base64, json, hashlib
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
def b64u(s): return base64.urlsafe_b64decode(s + '=' * (-len(s) % 4))
p = json.loads(b64u(token.removeprefix('TLABENC.v1.')))
key = hashlib.pbkdf2_hmac('sha256', password.encode(), b64u(p['salt']), p['iterations'], 32)
print(AESGCM(key).decrypt(b64u(p['iv']), b64u(p['ciphertext']), None).decode())Note that createdAt is readable by anyone who has the token, as is the iteration count.
How strong is it, and how to choose a password
AES-256-GCM itself isn't the weak point. Anyone who gets your token can try passwords offline as fast as their hardware allows, so the password decides how safe the text is. PBKDF2 slows each guess down: the OWASP Password Storage Cheat Sheet recommends 600,000 iterations for PBKDF2-HMAC-SHA256, and that is the default here. The slider goes from 100,000 to 2,000,000. The iteration count is saved in the token, so decryption picks it up automatically; to stop a crafted token from freezing the page, the tool refuses tokens that ask for more than 5,000,000 iterations.
Use a long, random password or a passphrase of several unrelated words, and send it through a different channel from the token, for example the token by email and the password by phone. The strong password generator can create one. There's no recovery: if you forget the password, the text can't be decrypted by you, ToolzyLab or anyone else.
How to decrypt text
Paste the token or JSON into Input Text. With Auto-detect encrypted input ticked, the tool spots the TLABENC.v1. prefix or the JSON fields and switches Action to Decrypt text. Enter the password, then select Decrypt or Run. Confirm Password isn't needed for decrypting.
"Decryption failed. Wrong password or corrupted encrypted text." means the GCM check rejected it: the password is wrong, or the token was cut off or edited, often by a chat app wrapping long lines. Copy the full token again. Swap input and output moves a result back to the input, which is handy for checking that a fresh token decrypts before you send it.
Trim outer whitespace is on by default, so leading and trailing spaces and line breaks are removed before encryption. Untick it if they matter. This tool is for encrypting text; a hash is one-way and can't be reversed, which the hash generator page explains.
Frequently asked questions
Is it safe to encrypt text online here?
The text and password never leave your browser: encryption runs locally with the Web Crypto API and nothing is uploaded or stored. The result is as safe as your password is hard to guess.
What encryption does this tool use?
AES-256 in GCM mode, with the key derived from your password by PBKDF2-HMAC-SHA256 using a random 16-byte salt. Each encryption also uses a random 12-byte IV.
Can I decrypt text without the password?
No. There's no backdoor or recovery option. Without the exact password, including capital letters and spaces, the text can't be decrypted.
Why does the same text give a different result each time?
A new random salt and IV are generated for every encryption. That's intentional: it stops anyone from telling that two tokens contain the same message.
Can other tools decrypt the output?
Yes, if they implement PBKDF2-HMAC-SHA256 and AES-256-GCM with the stored salt, IV and iteration count. The Python example on this page shows how.
How many PBKDF2 iterations should I use?
Use 600,000, the OWASP recommendation for PBKDF2-HMAC-SHA256, unless the device doing the decrypting is slow. Higher counts make each password guess more expensive for an attacker.