File Encryption Tool

Encrypt and decrypt files securely in your browser.

About File Encryption Tool

Two tabs, one password field. Encrypt takes any file and returns it as a .encrypted download that nobody can read without your passphrase. Decrypt takes that file back and restores the original, with its proper type and name. The file is read from disk by your browser and never leaves the tab — which is precisely the point, since uploading a file to be encrypted would mean handing someone the plaintext first.

How a file becomes a text blob

AES operates on bytes, but this tool deliberately routes them through text. Your file is first read as a data URL — a Base64 rendering of the bytes with the MIME type written at the front — and that whole string is encrypted with AES-256 in CBC mode. The ciphertext is then Base64 encoded again inside OpenSSL's Salted__ envelope. Carrying the MIME type inside the encrypted payload is what allows the Decrypt tab to give you back a real PDF or PNG rather than an untyped lump you would have to rename yourself.

The cost of that design is size. Base64 inflates data by about a third, and it is applied twice, so the .encrypted file lands at roughly 1.8 times the original. Ten megabytes in, about eighteen out. Since the whole thing is held in memory as strings while it works, that ratio also sets the practical ceiling: tens of megabytes are fine, hundreds will stall the tab.

Be clear-eyed about the strength

The cipher is AES-256 and that part is beyond reproach. The weak link is how your passphrase becomes a key: MD5 over the passphrase and a random salt, run once. A single hash is essentially free to compute, which means it is also essentially free for someone holding your file to test candidate passwords by the million. Purpose-built schemes make this step deliberately expensive — PBKDF2 with hundreds of thousands of rounds, or scrypt and Argon2 which also demand memory — so that each guess costs real time. Nothing here does that, and the second gap is integrity: CBC mode carries no authentication tag, so a modified file decrypts to different bytes rather than raising an alarm.

What that means in practice: this is a good way to keep a document unreadable to casual access — in a cloud sync folder, on a shared drive, on a USB stick — provided you choose a long random passphrase from a password manager. It is not the right tool for material where someone determined would come after the file specifically. For that, use GPG, age, VeraCrypt, or an archiver with modern AES and a proper key derivation function.

Round-tripping without surprises

Encrypting appends .encrypted to the existing filename; decrypting strips it again, so the original name comes back. The Decrypt tab only accepts files this tool produced — it verifies that what came out is a data URL and refuses anything else with an explicit message, rather than saving a corrupt download you would discover later. A wrong password fails the same check and is reported as such. Note that the filename is not part of the encrypted payload, so it is visible to anyone who sees the file: do not describe the contents in the name.

There is no recovery

No password, key, or copy of any file is stored at any stage, and no request is made in either direction — so there is nothing to reset and nobody to ask. Save the passphrase somewhere durable before deleting the original, keep it separate from the encrypted file, and test decrypting once before you rely on the archive. If you only need to protect a short piece of text rather than a document, the Encrypt Text tool applies the same cipher without the file handling.

AES-256 Over Any File Type

The file is read as raw bytes and wrapped as a data URL before encryption, so images, PDFs, spreadsheets, archives and executables all survive the round trip byte for byte — the type is not inspected or restricted.

Remembers What It Was

The original MIME type travels inside the encrypted payload, so decrypting restores a file your operating system opens correctly rather than an anonymous blob you have to rename by hand.

Nothing Uploaded, Either Direction

Reading, key derivation, encryption and the resulting download all happen in this tab. The file never crosses the network, which is the whole reason to encrypt it here rather than on a server that would see the plaintext.

Frequently Asked Questions

What does the .encrypted file actually contain?

A single line of Base64 text — not a binary container. Your file is first read as a data URL, which is a Base64 rendering of its bytes with the MIME type at the front. That whole string is then encrypted with AES-256 in CBC mode and the result is Base64 encoded again in OpenSSL's Salted__ envelope. Keeping the MIME type inside the payload is what lets the decrypt step hand back a properly typed file.

Why is the encrypted file so much bigger?

Expect roughly 1.8 times the original size. Base64 costs a third on its own, and it is applied twice — once turning the file into a data URL and once encoding the ciphertext. A 10 MB PDF therefore lands at about 18 MB. That is the price of storing the result as text; a binary format would add only a few bytes, but it would not survive being pasted into places that expect text.

Can I decrypt a file that something else encrypted?

No. The Decrypt tab specifically checks that the decrypted content is a data URL, and refuses anything else with a message saying so. That guard exists because without it a wrong input would produce a corrupt download with no explanation. Only files produced by this tool's Encrypt tab can be restored here.

How is my password converted into a key?

With OpenSSL's legacy derivation: MD5 over the password and a random eight-byte salt, run once, to produce a 256-bit key and an initialisation vector. One iteration makes it fast to compute — and therefore fast for an attacker to guess against. Modern schemes deliberately use hundreds of thousands of PBKDF2 rounds or a memory-hard function like Argon2 for exactly that reason, so the protection here rests almost entirely on choosing a long, genuinely random passphrase.

Is this good enough for genuinely sensitive files?

Be realistic about it. AES-256 is not the weakness; the fast key derivation and the absence of any integrity check are. It is well suited to keeping a document unreadable in a cloud backup or on a shared drive against casual access. For material where a motivated attacker with the file is part of your threat model — legal, medical, financial records — use a tool built for it, such as GPG, age, VeraCrypt or an encrypted archive with a modern key derivation function.

Will it tell me if the file was tampered with?

Not reliably. CBC mode carries no authentication tag, so modified ciphertext decrypts to different bytes rather than raising an error. In practice the data-URL check catches most corruption, because altered bytes rarely still begin with a valid data URL prefix — but that is a side effect, not a designed integrity check, and it cannot detect a change confined to the middle of the payload.

How large a file can I encrypt?

Considerably smaller than you might expect. The file is read entirely into memory as a Base64 string, encrypted into another string, and held again as a download blob, so peak memory is several times the file size and the work happens on the main thread. Files up to a few tens of megabytes are comfortable; a few hundred will make the tab hang or fail outright. For large archives, use a desktop encryption tool.

What happens to the filename?

Encrypting appends .encrypted to the existing name, so report.pdf becomes report.pdf.encrypted. Decrypting removes that suffix if it is present, restoring report.pdf. Note that the name itself is not encrypted — it is chosen by your browser at download time and is plainly visible, so avoid putting anything revealing in the filename of a file whose contents you are trying to protect.

What if I lose the password?

The file cannot be recovered, by anyone, including us. No password, key or copy of your file is stored at any point — there is nothing to reset and no back door. Record the passphrase somewhere durable before you delete the original, and do not store it alongside the encrypted file.