Skip to content

AES encryption tool

Free, no sign-up Runs in your browser

Encrypt and decrypt text with AES-256-GCM and a passphrase, using PBKDF2 with 600,000 iterations. Documented output format. Everything stays in your browser.

Direction

The encryption is only as strong as this. Use a long random passphrase, and send it to the other person by a different channel than the encrypted text.

Encrypted (Base64)
The result appears here.

AES-256-GCM with a key from PBKDF2-HMAC-SHA-256 at 600,000 iterations. The output is Base64 of: 1 version byte (01), the iteration count (4 bytes, big-endian), the salt (16 bytes), the nonce (12 bytes), then the ciphertext with its 16-byte tag at the end. Anything that speaks AES-GCM and PBKDF2 can decrypt it with the passphrase. Nothing leaves your browser.

Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.

How to use the AES encryption tool

  1. Choose Encrypt or Decrypt.
  2. Enter the text, or paste the Base64 this tool produced earlier.
  3. Enter the passphrase and press the button. Deriving the key takes a moment.
  4. Copy the result. Share the passphrase separately from the encrypted text.

About this tool

This tool encrypts a piece of text with a passphrase so that only someone with the same passphrase can read it. It uses AES-256 in GCM mode, an authenticated cipher: besides hiding the text, it attaches a tag that fails to verify if a single bit of the result is changed. That is why decryption here either returns exactly what was encrypted or reports an error, and never returns altered text.

A passphrase is not a key, so the tool derives one with PBKDF2-HMAC-SHA-256 at 600,000 iterations, the minimum OWASP currently recommends, with a fresh random 16-byte salt. A fresh 12-byte nonce is drawn for every encryption. The output is one Base64 string holding a version byte, the iteration count, the salt, the nonce and the ciphertext with its tag. The layout is documented on the page so the text can be decrypted with a few lines of code in any language.

The weak point is always the passphrase. PBKDF2 slows each guess, but a short or common passphrase still falls to an attacker who has the encrypted text and time. Use a long random passphrase, and send it by a different channel from the ciphertext. When decryption fails, the cause is a wrong passphrase or text that was changed or cut off; GCM cannot tell which, by design.

Sources

Questions

Is AES-256-GCM secure?

Yes. AES-256 has no practical attack, and GCM adds integrity protection so tampering is detected. Its one strict rule is that a nonce must never repeat under the same key. This tool derives a new key from a new salt and draws a new random nonce for every encryption, so that cannot happen.

Why 600,000 PBKDF2 iterations?

That is the minimum the OWASP Password Storage Cheat Sheet gives for PBKDF2-HMAC-SHA-256. Each iteration makes every guess of the passphrase slower for an attacker, at the cost of a fraction of a second for you. The count is written into the output, so it can be raised later without breaking old ciphertexts.

Can I decrypt the output without this page?

Yes. Decode the Base64, read the version byte, the 4-byte iteration count, the 16-byte salt and the 12-byte nonce, derive a 32-byte key with PBKDF2-HMAC-SHA-256, and decrypt the rest with AES-256-GCM, where the last 16 bytes are the tag. Our tests do exactly that with Node’s crypto module.

What does “wrong passphrase or tampering” mean?

The authentication tag did not verify. Either the key is wrong, which means the passphrase is, or the ciphertext is not what was produced: a character changed, or part was lost in copying. An authenticated cipher refuses to output anything in both cases, so a bad guess cannot be told from a damaged message.

Is this suitable for encrypting files or backups?

It is built for short text: a note, a credential to hand over, a config value. For files and backups use a tool made for that, such as age or GnuPG, which handle large data in pieces and manage keys properly.

Related tools