📅 September 29, 2016     🕐 2 minutes read

HOW TO: Easily Encrypt/Decrypt Files on a Mac

easy way to encrypt/decrypt files on a mac


Let’s say you want to store sensitive files on a flash drive, or maybe send it out via email, or whatever the case may be. You’ll probably want to encrypt that file.

There’s a bunch of apps ( free or paid ) that can do that for you, but there’s also an easy way to do that using a built-in Mac app… the terminal.

Jump over the break to learn how to easily encrypt/decrypt files….

ALSO READ HOW TO: Easily Encrypt/Decrypt Folders on a Mac and A Quick Look At VeraCrypt Encryption Tool

1. Open Terminal

2. Type openssl enc -aes-256-cbc -e -in *path-to-file-you-want-to-encrypt* -out *path-to-where-the-encrypted-file-will-be-saved*


NOTE: You can drag and drop the file you want to encrypt instead of manually typing in the path. You can do it again for the output encrypted file, but change the name of the file ( i.e from pdf.pdf to output.pdf ).

3. Type in the password for your encryption ( you will not be able to see what you’re typing )


3.1 You need to type the password twice


4. That’s it, your encrypted file is now saved, and you can’t open it without decrypting it first.


Now let’s see how to decrypt the file…

1. Open up terminal

2. Type openssl enc -aes-256-cbc -d -in *path-to-file-you-want-to-encrypt* -out *path-to-where-the-encrypted-file-will-be-saved*


3. Type in the password, and you’re done


Let’s recap… Here we’re encrypting a .pdf file. The .pdf is saved on the desktop and the encrypted file will also be saved on the desktop.

1. openssl enc -aes-256-cbc -e -in /Users/murdafsm/Desktop/pdf.pdf -out /Users/murdafsm/Desktop/output.pdf ( note that i changed the file name for the output )

2. Type in the password twice and I’m done.

Let’s decrypt the file…

1. openssl enc -aes-256-cbc -d -in /Users/murdafsm/Desktop/output.pdf -out /Users/murdafsm/Desktop/output1.pdf ( note that i changed the output filename again )

2. Type in the password and you’re done.


FSM has no ads or affiliate links. Your support would simply pay for our servers, domain and maintanance. If there's any leftover change, we'll get some coffee and a slice of pizza. ​

Merch   FSM Goodies ( Alpha release )
Monero (XMR) 43GnqUNJrTi9QyL7kEH8vM8pgWGCE6bjv1FSRipeNMM4TTeNnUVsRBb6MfMpQYxtLE7ReonxVVSXz2rFCEdW5H11LC3x73b
Bitcoin (BTC) 1Hfuq77gKKFJeNcq4EP4dQK3yDRWrFEwJR
Bitcoin Cash (BCH) qzmdm6e6q5wf2p6sxz2mst7cenz60newwc5m4e9js8
Ether (ETH) 0x5f02869278C24A6579d3820f52AD15936D6F9d69
More content?