By Tim King · Updated
File Encryptor
Passphrase-Based AES-256-GCM With PBKDF2 Key Derivation for Any File Type
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the File Encryptor works
This file encryptor locks any file with a passphrase using AES-256-GCM, so you can send it or store it in the cloud without anyone being able to open it. Encryption and decryption both happen in your browser, and the file is never uploaded. Choose Decrypt and the same passphrase to get the original back.
How the file encryptor protects your file
Your passphrase is stretched into a 256-bit key with PBKDF2-SHA256 and 600,000 iterations, using a random 16-byte salt, which makes guessing passphrases slow. The file is then encrypted with AES-GCM under a random 12-byte nonce. GCM is authenticated, so any change to the encrypted file, or a wrong passphrase, is detected rather than producing garbage. The salt and nonce are stored at the start of the output file.
The file format
An encrypted file is the 16-byte salt, then the 12-byte nonce, then the ciphertext with its 16-byte
authentication tag. It is 44 bytes larger than the original and gets a .enc extension. The format is
the same as the text encryptor on this site, so text encrypted there and saved as a file decrypts here.
FAQ
What happens if I forget the passphrase?
The file cannot be recovered. There is no back door and no reset, which is the point of encryption. Store the passphrase in a password manager, or split it with a secret-sharing tool and give the pieces to people you trust.
How large a file can I encrypt?
The whole file is held in memory while it is encrypted, so the practical limit is your device's memory. Files of a few hundred megabytes work on most computers. For very large archives, a desktop tool such as age or 7-Zip will be faster and uses less memory.
How strong should the passphrase be?
The encryption is only as strong as the passphrase. Use at least four or five random words, or sixteen or more random characters. A short or common password can be guessed offline by anyone who has a copy of the encrypted file, however slow each guess is made.
See also: all Security & Identifiers tools, Dev Utilities, Formatters & Validators, Data & Encoding, SEO, Accessibility, AI.
Related tools
Text Encryptor
Encrypt and decrypt messages with a passphrase, AES-256-GCM in your browser.
Passphrase Generator
Diceware passphrases from the EFF wordlist, generated locally.
Secret Splitter
Split a secret into shares; any threshold of them rebuilds it.
AES Key Generator
Random AES-128, 192 or 256-bit keys in hex, Base64 or JWK.
Secure Note
Share a password as an encrypted link that no server ever sees.