Sample code for 30+ languages & platforms
Java

Decode Base64

Demonstrates how to decode base64.

Chilkat Java Downloads

Chilkat2 Java
import com.chilkatsoft.chilkat2.BinData;

public class ChilkatExample {

    public static void main(String[] args) {
        BinData bd = new BinData();

        // Append a base64 string to bd.
        bd.appendEncoded("c2VjcmV0", "base64");

        // The bd now contains the decoded bytes.
        // Let's say it was a password string..
        String password = bd.getString("utf-8");

        // Decodes to "secret".
        System.out.println("password = " + password);
    }
}