//hex <- int: hexString = yourNumber.toString(16); //int <- hex: yourNumber = parseInt(hexString, 16);