[java] Which Java library provides base64 encoding/decoding?

I am wondering which library to use for base64 encoding/decoding? I need this functionality be stable enough for production use.

This question is related to java

The answer is


Within Apache Commons, commons-codec-1.7.jar contains a Base64 class which can be used to encode.

Via Maven:

<dependency>
    <groupId>commons-codec</groupId>
    <artifactId>commons-codec</artifactId>
    <version>20041127.091804</version>
</dependency>

Direct Download


Guava also has Base64 (among other encodings and incredibly useful stuff)


If you're an Android developer you can use android.util.Base64 class for this purpose.