What's the simplest way to password protect a text file? I'd like to password protect a text file. Not necessarily a .txt file - just a file that's got text in it that I can edit with a standard text editor. I'd like to set a password and be prompted for it every time I open the file in any app. What's the best way?
You can put the file into an encrypted disk image.


Open "/Applications/Utilities/Disk Utility"
File > New > New Blank Image...
In the new image dialog make sure to choose:


Encryption = 128 or 256-bit AES
Image Format = read/write disk image

Because you chose encryption, you will be prompted to set a password for the disk image


You now have a password-protected disk image that you can save any kind of file in.