Use standard numeric format specifier: D8
using System; using System.Globalization; public class ParseInt32 { public static void Main() { int value = -11111; string specifier; specifier = "D8"; Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier)); } } //D8: -00011111