Do you want to actually write a Base64 Encoder/Decoder or are you happy to use an existing one ? If the latter, then read this for a way to do it with the standard API. There are also 3rd party APIs available that are probably easier to use. Search this forum and/or Google. I've seen the one from SourceForge get mentioned quite often, but haven't actually used it myself.