Sample code for 30+ languages & platforms
C#

Base62 Encoding and Decoding

Demonstrates base62 encoding and decoding.

Chilkat C# Downloads

C#
Chilkat.BinData bd = new Chilkat.BinData();

//  Base62 encode.
bd.AppendString("hello world","utf-8");
string base62_encoded = bd.GetEncoded("base62");
Debug.WriteLine("hello world --> " + base62_encoded);

//  Output: 
//  hello world --> AAwf93rvy4aWQVw

//  Base62 decode
Chilkat.StringBuilder sb = new Chilkat.StringBuilder();
sb.DecodeAndAppend("AAwf93rvy4aWQVw","base62","utf-8");
Debug.WriteLine("decoded: " + sb.GetAsString());

//  Output:
//  decoded: hello world