How to Encrypt a File or Folder via NTFS

by Barry Dysert
(last updated February 13, 2017)

1

If you share your computer with others, you may want to encrypt files or folders so that no one can see their contents. This can be done natively in Windows 10 by using the built-in capabilities of the file system.

Let's say I have a file called C:\Temp\Barry.tmp whose contents I want to encrypt. I can do so by right-clicking the file and choosing the Properties menu item. I see the following window: (See Figure 1.)

Figure 1. The Properties dialog box for Barry.tmp.

Near the bottom of the page, click the Advanced button, and you'll be presented with the Advanced Attributes dialog box. (See Figure 2.)

Figure 2. The Advanced Attributes dialog box.

Click the bottom checkbox labeled "Encrypt contents to secure data", then OK your way back to File Explorer. (See Figure 3.)

Figure 3. File Explorer's view of your encrypted file.

Notice that your file is color coded to let you know its contents are encrypted (assuming your settings provide for this). The interesting thing is that you can still display and work with this file as if it weren't encrypted as long as you're the one logged into the machine. If someone else logs in, though, they'll not be able to open the file because it's encrypted for them. For example, while I'm still logged in I can open the file in Notepad and read its contents.

However, if I login as someone else with permission to that file and try to open it, I get an "Access Denied" error. The file is essentially password protected by your Windows credentials so that a user logged in as someone else cannot see the contents of the file.

To decrypt the file, just follow the reverse procedure, i.e., right-click the file, select Properties, click Advanced, and uncheck the box labeled "Encrypt contents to secure data". Again, OK your way back to File Explorer, and now your file can be opened by anyone who otherwise has permissions.

 This tip (77) applies to Windows 7, 8, and 10.

Author Bio

Barry Dysert

Barry has been a computer professional for over 35 years, working in different positions such as technical team leader, project manager, and software developer. He is currently a software engineer with an emphasis on developing custom applications under Microsoft Windows. When not working with Windows or writing Tips, Barry is an amateur writer. His first non-fiction book is titled "A Chronological Commentary of Revelation." ...

MORE FROM BARRY

Swapping Mouse Buttons for Left-Handed Users

By default, the mouse is configured such that the primary mouse button is the left one, and the secondary mouse button is ...

Discover More

Understanding Windows Slide Show

If you have folders containing pictures, you may want to display them in a slide show. This tip explains how to do it.

Discover More

Restoring the Built-in Windows Libraries

Windows comes with four built-in libraries. You may accidentally (or on purpose) delete one or more of them. This tip ...

Discover More
More WindowsTips

Understanding the NTFS File System

The NTFS file system is at the core of the Windows operating system. This tip explains a bit about it.

Discover More

Using the ChkDsk Utility

The ChkDsk utility is a nice feature of Windows that lets you keep tabs on the health of your disk drives. This tip tells ...

Discover More

Disabling System Restore

Restore points are good to have in case a problem occurs while trying to make changes to your system. If for some reason ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is one more than 2?

2017-02-13 13:42:40

RayStA

On my system (Windows 10 Home, 64-bit, fully updated) "Encrypt contents to secure data" and its box are greyed-out. Solution please. [I am signed on with an administrator account


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.