Free tool · works offline · no upload

Encrypt a file with a passphrase

Lock a file before you store it or send it, and only someone with the passphrase can open it. Choose a file, set a passphrase, and get a locked copy, made here on your device.

  1. 1Choose
  2. 2Check
  3. 3Process
  4. 4Verify
  5. 5Download

Write the passphrase down before you lock the file. Nobody, including us, can open the file without it.

    Runs entirely in this page. Your files are never uploaded: apart from a cookie-free visit count, this page's security policy blocks it from sending anything.

    How to use it

    1. Choose any file, or drop it on the box. A file already locked by this tool is recognised, and the tool switches to unlocking it.
    2. To lock, type a passphrase twice, or press Generate for six random words. Write it down: it can't be recovered.
    3. Press Lock file. Your browser turns the passphrase into a key and encrypts the file in parts.
    4. The tool unlocks the new file again with your passphrase and compares it with the original before offering it.
    5. Save the .locked file. To open it later, choose it here and enter the passphrase.

    When locking a file helps

    Some files are fine to store or send but not fine to be read by whoever ends up holding them: a scan of a passport, a tax return, medical results, a contract. Locking turns the file into one that’s useless without the passphrase. You can then put it on a memory stick, in a shared folder or in an email attachment, and the place it sits never sees what’s inside.

    To send one, share the passphrase by a different route than the file, such as a phone call or in person. Someone who intercepts one of them then has nothing useful.

    How it works

    Your passphrase is turned into a 256-bit key with Argon2id, a method designed to be slow and memory-hungry, so each guess at a passphrase costs an attacker real time and memory. The tool uses 128 MiB and three passes, with a random salt, so the same passphrase gives a different key for every file.

    The file is then encrypted in 1 MiB parts with XChaCha20-Poly1305. Each part carries its own authentication tag, which works like a seal: if a single bit of the locked file is changed, cut off, reordered or added to, unlocking stops and says which part failed. A wrong passphrase is caught the same way, before anything is written.

    These are the same cipher and key-derivation method that Silo uses for its vault on the phone, so the tool also shows, in a form you can try, how Silo keeps files private. The encryption library is libsodium, a widely used open-source library, compiled to run inside the page. It loads when you first lock or unlock a file.

    The format

    A locked file is a short header followed by the encrypted parts. Integers are big-endian.

    Bytes Content
    0–7 The text SILOLOCK
    8 Version, 1
    9 Part size as a power of two (20 means 1 MiB)
    10–11 Reserved, zero
    12–19 Argon2id passes and memory in bytes
    20–35 Salt
    36–51 Nonce prefix for the parts
    52–79 Length M of the details, and their nonce
    80 on The details (name, size, type), encrypted, M + 16 bytes
    then The parts, each 16 bytes longer than its plaintext

    Part i uses the nonce prefix followed by i as an 8-byte number. Its additional data is the BLAKE2b-256 hash of the whole header plus one byte that marks the final part, written as hex. The details use the first 80 header bytes, as hex. The passphrase is normalised to Unicode NFC before the key is made.

    Private by design

    The only thing the page sends is a cookie-free visit count (which page, the site you came from, your browser type and how fast the page loaded). Its security policy blocks every other connection, so neither the file nor the passphrase can leave your device.

    Questions

    Is my file uploaded anywhere?

    No. Locking and unlocking run inside this page on your device. The page's security policy blocks it from sending your files anywhere, so it works the same with your connection off once the page has loaded.

    What if I forget the passphrase?

    The file can't be opened. There's no reset and no copy of the key anywhere, which is exactly what makes it safe. Write the passphrase down, or keep it in a password manager.

    How large a file can I lock?

    On a computer whose browser can save straight to disk, any size: the tool streams the file in 1 MiB parts and asks where to save large results. Elsewhere the result is built in memory, so the limit is 1 GB, and less on some phones.

    Can someone see the file's name or type?

    No. The original name and type are stored inside, encrypted with the file. The locked copy shows only its approximate size.

    Can other programs open a locked file?

    Yes, with a little code. The format is published below and uses standard building blocks found in any libsodium library, so the file doesn't depend on this page existing.

    Sources

    1. libsodium: XChaCha20-Poly1305 construction
    2. libsodium: Password hashing with Argon2
    3. RFC 9106: Argon2 memory-hard function