Example:
This image
can be kept in a binary file, but
encoded with BASE64 it looks as:
iVBORw0KGgoAAAANSUhEUgAAACAAAAATBAMAAAADuhLEAAAABGdBTUEAALGP C/xhBQAAAAFzUkdCAdnJLH8AAAAPUExURYSEhP///wAAAP//AP8AACykMFsA AABsSURBVHjahdDBDcMwDENRWhsw9AJRuwCBLuAi+8+UQ+rGTg75NwkPECBg LlDmAuBUoCyZfapbm4Tr1gJlybVvPt/XKMz6boHyX4iWBmGKdBf5i6cwSVpX 4fGKnoRpqQsdV+1TmLYkBW4Pyks7gc8WIpISYokAAAAASUVORK5CYII=
The encoding technique can be found here: http://www.ietf.org/rfc/rfc1521.txt, but most likely it's unnecessary because many server-side scripting languages support functions for BASE64 encoding/decoding.
BTW Did you know that e-mail software uses BASE64 encoding to hold attached files? This is because the widely used e-mail protocols SMTP and POP3 are not capable to manage binary content.