I found this useful class for base64 encoding / decoding. It is written by Kiichi Takeuchi

Base64.h

@interface Base64 : NSObject {
}

+ (void) initialize;
+ (NSString*) encode:(const uint8_t*) input length:(NSInteger) length;
+ (NSString*) encode:(NSData*) rawBytes;
+ (NSData*) decode:(const char*) string length:(NSInteger) inputLength;
+ (NSData*) decode:(NSString*) string;

@end

Sample Usage

[Base64 initialize];
NSData * data = [Base64 decode:@"SGVsbG8gV29ybGQ="];
NSString * actualString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@",actualString);
[actualString release];

Download base64 encode / decode class