Text Encryptor and Decryptor
Encrypt or decrypt text with a password using AES-256-GCM and a PBKDF2-SHA-256 key of 600,000 iterations. The password cannot be recovered if lost. How it works
Use the Text Encryptor and Decryptor
How It Works
AES-256-GCM with PBKDF2 key derivation (600,000 iterations, SHA-256), run in your browser with the Web Crypto API; the output starts with lted-v2:. Strings from earlier versions of this page (no prefix, 100,000 iterations) can still be decrypted. The password is the only protection: a short or common password can be guessed, and a lost password cannot be recovered.
About the Text Encryptor and Decryptor
Encrypting hello with the password correct horse gives a 76-character string that starts with lted-v2:. The tool derives an AES-256 key with PBKDF2-HMAC-SHA-256 from your password and a random 16-byte salt at 600,000 iterations, then encrypts with AES-GCM. Strings from the older version of this page, with 100,000 iterations and no prefix, still decrypt.
The two string formats this tool reads
| Format | Starts with | PBKDF2-SHA-256 iterations | Bytes that are Base64-encoded | Written by Encrypt |
|---|---|---|---|---|
| Current | lted-v2: | 600,000 | salt (16), IV (12), ciphertext, tag (16) | Yes |
| Earlier version | no prefix | 100,000 | salt (16), IV (12), ciphertext, tag (16) | No, decrypt only |
From the constants the tool uses. The key is 256 bits and the salt is used as raw bytes. Standard Base64 is written; URL-safe Base64 with the padding left off is also read.
Length of the encrypted string by text length
| Text length (UTF-8 bytes) | Encrypted string (characters) |
|---|---|
| 0 | 68 |
| 1 | 68 |
| 5 | 76 |
| 100 | 200 |
| 1,000 | 1,400 |
Produced by running Encrypt on text of each length; the count includes the 8 characters of lted-v2:. The rule is 8 + 4 × ceil((44 + n) / 3) for n bytes.
How to use this tool
- Choose Encrypt or Decrypt.
- Type or paste the text. To decrypt, paste the whole string, starting with lted-v2: for a string made by the current version.
- Type the password. Show password lets you check it.
- Press the button. The result appears below with a Copy button; changing the mode, the text or the password clears it.
Frequently asked questions
- How do I encrypt text with a password?
- Choose Encrypt, type the text and a password, and press the button. Send the lted-v2: string, and give the password to the other person by a different route. To read it, they paste the string into Decrypt with the same password. A lost password cannot be recovered.
- Is AES-256-GCM secure enough for my text?
- The cipher is not the weak point; the password is. AES is specified in FIPS 197. The tool slows each password guess with 600,000 PBKDF2 iterations, but a guessable password stays guessable: 8 random lowercase letters have 37.6 bits in the Password Entropy Calculator’s model, and 16 have 75.2 bits.
- Can I still decrypt text from the older version of this page?
- Yes. A string with no lted-v2: prefix is read as the older format, 100,000 iterations. If decryption fails for such a string, the message adds that a string made by the current page starts with lted-v2:, so paste it with the prefix.
- Why is the encrypted text different every time?
- Each encryption uses a new random 16-byte salt and 12-byte IV. The same text and password give a different string every run, and every one of them decrypts to the original text.
- What does “the password is wrong or the encrypted string was changed” mean?
- AES-GCM adds a 16-byte tag that fails to check when the key is wrong or any character of the string was altered, and the two cases look the same, so the page cannot say which. Text that is not Base64, or is shorter than 44 bytes once decoded, gets a different message that does not blame the password.
- Can I decrypt the string with another program?
- Yes, if it follows the layout in the table: PBKDF2-HMAC-SHA-256 with the raw salt bytes, 600,000 iterations, a 256-bit key, then AES-GCM with the 12-byte IV and the tag at the end. The AES Encryption tool on this site uses the same cipher, key size and iteration count but writes its own v1: format, and the two are not interchangeable: decrypt a lted-v2: string, or an older one with no prefix, here, and a v1: string there.
Related Tools
View all toolsAES Encryption
Encrypt and decrypt text with a password using AES-256-GCM, the key derived by PBKDF2-SHA256 at 600,000 iterations. Strength depends on the password.
PBKDF2 Calculator
Derive a PBKDF2 key in hex or Base64 from a password and salt with HMAC-SHA-1, SHA-256, SHA-384 or SHA-512, and check it against a key you paste.
Hash Generator
Compute the MD5, SHA-1, SHA-256, SHA-384 or SHA-512 hash of text or a file and compare it with an expected checksum. The file is hashed in your browser.
Password Entropy Calculator
Estimate password entropy as length × log₂(pool size) and average crack times at three guess rates. Common passwords and patterns are rated Very Weak.
Password Generator
Generate a random password of 8 to 128 characters from uppercase, lowercase, numbers and symbols, and see its entropy in bits. Can skip look-alike characters.
Base64 Converter
Encode text to Base64 or decode Base64 to text. UTF-8, standard and URL-safe alphabets, optional padding on decode, up to 250,000 characters.