When using Tango, this can be done like this: import tango.text.convert.Integer; int i = toInt( "12AB", 16 ); long l = toLong( "ffffFFFFAAAA", 16 ); see also: http://www.dsource.org/projects/tango/wiki/ChapterConversions and the source at http://www.dsource.org/projects/tango/browser/trunk/tango/text/convert/Integer.d Frank