macOS encrypted folder
Tags: macos, howto, privacy, tip
Published: 2019-03-20 13:13:48

---
title: macOS encrypted folder
published: true
description: How to make an encrypted password protected folder on macOS 
tags: macos, howto, privacy, tip
cover_image: https://thepracticaldev.s3.amazonaws.com/i/np72szm920xa82od4olv.png
---

_I recently discovered how to make an encrypted password protected folder on macOS, I thought that this might not be a well known feature and that it would be useful to share with the DEV community._

This is a feature build-in to macOS already so no third-party tools are needed. Apple first introduced this feature in macOS Mountain Lion.

So if you want to hide your "top secret files" or your cat pics from your colleagues/family read ahead because it is super easy.

## Making an encrypted folder

- You will need to use Disk Utility, so open that with Spotlight or you can find it in your Applications folder.
- In the "File" menu go to "New Image" and choose "Image from Folder...".
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/op1ll4mc8kw2ynw145y9.png)
- Your Finder will open, here you navigate into the "top secret files" folder that you want to encrypt, press "Choose" at the bottom of the Finder.
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/ynk8bd0kcfiauncn7kr9.png)
- In following screen you can change encrypted folder name (Save As) and location (Where).
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/q3zapttignv26ha9ss8n.png)
- Next we want to change "Encryption" to "128-bit AES encryption (recommended)", this will open a new window where you can set the password that you want for your encrypted folder.
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/rmmm5sg1tmecablw14vg.png)
- I would also suggest to set "Image Format" to "read/write", this will enable you to add new files to the encrypted folder after that it has been made (a working directory).
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/2hnnhqdc7hufo4q0jf68.png)
- If everything went well you should see this screen.
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/anj0uhov6tb9ptozcqw3.png)

**This will give you a `.dmg` file that can be moved or shared between devices, just don't forget the password.**

## Opening the encrypted folder

Opening the encrypted folder is even easier than making it!

- Go to the location where you saved the encrypted folder.
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/v8k20k3gcyr8wt8ub2za.png)
- Double click the `.dmg` file and it will request you to enter the password you created earlier.
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/l9uh9oegv123mj61bv1j.png)
- After that it will add the encrypted folder as a mounted disk in your Finder under "Locations".
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/nspatbaxhn6jlb5bw6nu.png)
- You can now view, edit, move, add or delete any of the files.
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/jdp2q6g4t7a2jy4wne59.png)
- When you are done working in your encrypted folder and don't want other people to be able to access it just press the "eject" button behind the mounted disk.
![Disk Utility File menu](https://thepracticaldev.s3.amazonaws.com/i/5vhyizrtvhbgf6k5o4un.png)

**The `.dmg` will work as a mounted disk image, so any changes that you do on there will stay in the encrypted folder without needing to make a new one.**