Sample code for 30+ languages & platforms
Delphi ActiveX Requires Chilkat v11.2.0+

Base62 Encoding and Decoding

Demonstrates base62 encoding and decoding.

Chilkat Delphi ActiveX Downloads

Delphi ActiveX
var
bd: TChilkatBinData;
base62_encoded: WideString;
sb: TChilkatStringBuilder;

begin
bd := TChilkatBinData.Create(Self);

//  Base62 encode.
bd.AppendString('hello world','utf-8');
base62_encoded := bd.GetEncoded('base62');
Memo1.Lines.Add('hello world --> ' + base62_encoded);

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

//  Base62 decode
sb := TChilkatStringBuilder.Create(Self);
sb.DecodeAndAppend('AAwf93rvy4aWQVw','base62','utf-8');
Memo1.Lines.Add('decoded: ' + sb.GetAsString());

//  Output:
//  decoded: hello world