b2KIT

age File Encryption Tool

Encrypt and decrypt files using the age encryption format. Support for passphrase and X25519 recipient keys.

Tested tool guide Tested browser tools Checked August 16, 2026

What age File Encryption Tool does and how it behaves

This tool encrypts and decrypts files in the age format entirely in the browser, using either a passphrase or an X25519 public key as the recipient. Encryption wraps a randomly generated file key inside one or more recipient stanzas, then streams the file contents through authenticated encryption. What trips people up: age has no recovery mechanism and no password hint field. If you encrypt to a public key and later misplace the matching secret key, or simply forget a passphrase, the file is unrecoverable by design - there is no backdoor.

How the result is produced

1

Recipient stanzas wrap a file key

Each recipient - an X25519 public key or a passphrase - gets its own stanza in the file header, each wrapping the same randomly generated file key. For an X25519 recipient the tool performs an ephemeral Diffie-Hellman exchange; for a passphrase it derives a wrapping key with scrypt using a random salt and an auto-tuned work factor.

2

Payload streamed and authenticated

Once a stanza is unwrapped, the recovered file key decrypts the actual contents in fixed-size chunks under an authenticated stream cipher, so any tampered chunk is detected before decryption finishes. Output is raw binary by default, or ASCII-armored text (wrapped in BEGIN/END AGE ENCRYPTED FILE lines) for pasting into email or chat.

Good uses

  • Encrypting a backup or config file with a passphrase before storing it on a cloud drive you don't fully trust
  • Encrypting a file to a specific person's X25519 public key so only their matching secret key can open it
  • Generating an X25519 keypair to use as a standing recipient identity for repeated file exchanges

Limits and checks

  • Ciphertext is never identical between runs on the same input, because the file key, nonce, and (for passphrase mode) salt are freshly random each time - don't expect reproducible output as a sanity check
  • There is no recovery path: a forgotten passphrase or a misplaced X25519 secret key (AGE-SECRET-KEY-1...) makes the file permanently unreadable, with no hint field or master key to fall back on
  • Encrypting to a public key only controls who can decrypt - it says nothing about who encrypted the file, since age has no signing feature to verify the sender

Common questions

Can I recover a file if I forget the passphrase or lose my private key?

No. age has no recovery mechanism, hint field, or master key by design. If a passphrase is forgotten or an X25519 identity is lost, the encrypted file cannot be decrypted by anyone, including the people who built this tool.

Is it safe to publish my age1... public key?

Yes. The age1... value is a public recipient key, not a secret - sharing it only lets others encrypt files to you. Keep the AGE-SECRET-KEY-1... identity private instead; that is the part that must never be shared.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools