Encrypt and decrypt a file in your browser
Protect a file with a passphrase before you send it by email, USB stick or cloud. The tool creates a .cfenc file that can only be opened again with the same passphrase. To decrypt, simply choose the .cfenc file here.
At least 12 characters. Use several random words. Without the passphrase the file cannot be recovered - not even by us.
Very large files are assembled in memory. If your browser supports saving directly to disk, you will be asked for a location first.
Everything happens locally in your browser. The file, passphrase and result are never sent to any server.
How the encryption works
Derive a key
Argon2id turns your passphrase and a random salt into a 256-bit key. Argon2id is deliberately memory-hard, which slows down guessing attacks.
Encrypt in chunks
The file is encrypted in 1 MiB chunks with XChaCha20-Poly1305 (libsodium secretstream). Every chunk is authenticated, so any change is detected on decryption.
Save locally
The result is saved to your device as a .cfenc file. None of it leaves your browser.
The .cfenc file format
The format is openly documented so you can decrypt your files with any libsodium implementation, even without this page. All numbers are unsigned 32-bit little-endian values.
The first 60 bytes are used as additional authenticated data for every chunk, so a modified header causes an error instead of wrong output. The original file name is not stored.
What the tool protects - and what it does not
- Without the passphrase the content cannot be read. Choose a long, unique passphrase.
- File size and timing remain visible to others; the file name is not written into the .cfenc file.
- Share the passphrase through a different channel than the file, for example by phone or messenger.
- Nobody can reset a forgotten passphrase. There is no back door.
Another tool: Calculate the SHA-256 checksum of a file
Store and share files with encryption
With a free account, cryptfiles.cloud encrypts every file in your browser automatically before it is uploaded - and you share it by link. 10 GB are free.
Create a free account