Insightsby Bernstein

How does client-side encryption protect confidential files?

Published 5 November 2026

The short answer

Client-side encryption encrypts a file on your device before it is uploaded. The server receives encrypted data rather than readable contents. If the provider cannot obtain the decryption keys, it cannot read the stored files. This helps protect confidential work while using online storage, but its effectiveness depends on key management, the software performing the encryption and the security of your device.

What happens before the file reaches the server?

“Client-side” means that the operation happens on your computer or other device. The software uses an encryption key to turn the readable file into encrypted data, often called ciphertext. That encrypted version is uploaded. To read it again, authorised software needs the corresponding decryption key.

For example, a company might store an unpublished manufacturing process with an online service. With correctly implemented client-side encryption and keys unavailable to the provider, access to the stored encrypted file alone would not reveal the process.

Can the encryption happen directly in the browser?

Yes. A web application can encrypt files locally using the browser’s built-in cryptographic capabilities, without requiring a separate desktop application or plugin. The browser is running on your device: using a website does not mean that every operation happens on its server.

The W3C’s Web Cryptography API defines interfaces for encryption and decryption, key generation, hashing and digital signatures. For example, an application can use AES-GCM to encrypt a file and detect alterations to the encrypted data. The application passes the file data to the browser’s cryptographic implementation, then uploads the encrypted result.

These capabilities provide the building blocks; the application decides how to use them and what to send to the server. Using Web Crypto does not by itself guarantee that readable files or keys never leave the device. That depends on the application’s code, key handling and security design.

The W3C Security Interest Group’s Cryptography usage in Web Standards provides complementary guidance on choosing algorithms and using them correctly. It is currently a draft guidance document, rather than the specification defining the browser API.

How is client-side encryption different from a secure connection or encrypted storage?

A service may protect the connection used to upload a file, encrypt the file once it reaches its servers, or encrypt it on your device before upload. These are three distinct protections, and a service can use all three together. To understand what each protects, consider where encryption happens and who can access the readable contents:

  • Encryption in transit, such as HTTPS, protects data as it travels between your device and the server. The server can still receive and process readable contents when that connection ends.
  • Server-side encryption at rest protects the stored data. If the provider’s systems control the keys, they can decrypt it when needed to deliver the service.
  • Client-side encryption protects the contents before upload. With keys kept outside the provider’s control, the contents remain unreadable to its servers even after the upload finishes.

The protections can be combined. The important distinction is not simply whether a service says “encrypted”, but where encryption happens and who can decrypt the result.

Why does control of the keys matter?

Encrypting a file locally provides little protection from the storage provider if the provider also receives an accessible copy of the key. Ask who can obtain or use the decryption keys: you, a recipient, an organisation administrator, a separate key service, or the storage provider itself.

Exclusive control also means taking responsibility for the keys. If only you can decrypt the files, you must keep the keys and recovery material secure and available when needed. Letting a provider or administrator recover access for you can be convenient, but if they can decrypt the files without your involvement, your control is no longer exclusive. The tradeoff is between the convenience of delegated recovery and the responsibility that comes with keeping access entirely under your control.

Recovery arrangements matter too. A service may let you reset your login password without being able to recover your encrypted files. Check how recovery works before relying on the service, and preserve the recovery material securely. Losing every usable key and recovery route can make the files inaccessible even if the encrypted copies are safely stored.

What does client-side encryption leave exposed?

The protection applies to the data that is actually encrypted. Depending on the implementation, filenames, file sizes, account details or access records may remain visible. A confidential project name can reveal information even when the document contents are unreadable.

It also does not protect a readable file from malware already running on your device, or prevent an authorised recipient from copying what they can open. The encryption software itself must be trustworthy. Device security, recipient selection and access controls remain part of protecting the work.

Sources

  1. 1.
    World Wide Web Consortium (W3C). Web Cryptography API . W3C Recommendation; sections 2.3, 6 and 14: cloud storage, security considerations and browser cryptographic operations. 26 January 2017. Accessed 5 November 2026
  2. 2.
    W3C Security Interest Group. Cryptography usage in Web Standards . Group Note Draft (work in progress): guidance on algorithm selection, key management and authenticated encryption. 29 January 2026. Accessed 5 November 2026
  3. 3.
    Canadian Centre for Cyber Security. Guidance on Cloud Service Cryptography . ITSP.50.106, sections 2.2 and 3.3: encryption in transit and at rest, and control of cloud encryption keys. 20 May 2020. Accessed 5 November 2026
  4. 4.
    Elaine Barker, National Institute of Standards and Technology. Recommendation for Key Management: Part 1 – General . NIST SP 800-57 Part 1 Rev. 5; protection of keying material and Appendix B on key recovery. May 2020. Accessed 5 November 2026
  5. 5.
    Andrew Paverd et al.. OmniShare: Securely Accessing Encrypted Cloud Storage from Multiple Authorized Devices . Academic research on client-side encryption, key distribution and access from authorised devices; arXiv:1511.02119v3. 29 December 2016. Accessed 5 November 2026
Suggest a correction

Tell us what is wrong and, if you can, where the correct information is published.

This site is protected by reCAPTCHA.

The correction form opens soon.