Skip to content
Usman Zubair
Go back

Encrypt any file on macOS

Encryption is of paramount importance when it comes to emailing sensitive files such as financial information, passport copies, and more.

While there are many standalone apps that encrypt and decrypt files, macOS provides the capability of encrypting and decrypting files from the Terminal.

Open Terminal and paste the following command (to Encrypt):

openssl enc -aes-256-cbc -e -in {file-path-in} -out {file-path-out}

Change the {file-path-in} and {file-path-out} with the files you want to encrypt and/or decrypt.

Easy! Right? Now to decrypt, just change -e to -d.

openssl enc -aes-256-cbc -d -in {file-path-in} -out {file-path-out}

That’s it. I found it be very useful when sending sensitive files.



Previous Post
macOS: Change screenshot file type
Next Post
Caffeine – Don't fall asleep