There's Apple's own Encrypted Disk Image format, in fixed & variable sizes [grow/shrink to fit, sparseimage]
Blatantly lifted Borrowed from
Apple KB: How to create a password-protected (encrypted) disk image
The KB is actually out of date as of El Capitan & the new Disk Utility layout, but
File > New Image > Blank Image [or Image from Folder]
will do just the job, the New Image icon has gone.
How to create a password-protected (encrypted) disk image
Learn how to use Disk Utility to create an encrypted disk image.
An encrypted disk image works just like a regular disk image but
requires a password to open and become available ("mount"). You can
move files to or from an encrypted disk image as easily as you can
from a non-encrypted disk image. Follow these steps to create an
encrypted disk image:
- Open Disk Utility (located in /Applications/Utilities/).
- Click the New Image button, or choose File > New > Blank Disk Image.
- Type a name in the Save As field. This name will be used for the disk image (.dmg) file.
- Change the save destination if you wish.
- Select a size for the disk image file from the Size pop-up menu.
- Choose a different volume format if you don't want to use the default Mac OS X Extended (Journaled).
- Choose an image format. You can use "sparse disk image" for a disk image that only uses as much space as it needs, rather than a set
amount of space. If you're not sure, use "read/write disk image"
choice.
- Choose 128-bit AES encryption (and/or 256-bit AES in Mac OS X v10.5 or later) from the Encryption pop-up menu to encrypt the image's
contents with a password. 1. If you don't choose an encryption, your
new image won't be encrypted.
- Click the Create button.
- Enter and verify a good password in the dialog window that appears. This password will be saved in your keychain by default, or
you can deselect "Remember password (add to keychain)" if you don't
want it saved. You can store the password in the keychain for
convenience.
- Click OK.
Important: If you forget the password, data stored in the encrypted disk image cannot be retrieved. If you have saved the
password in the keychain, the password will be available to you there.