Online Hex To Decimal Convert Tool




About Hex to Decimal (A free online tool to converts hexadecimal to Decimal)

Hex to Decimal tool convert hex string to decimal number. Many times we wants to convert hex to decimal that time we can use PHP provides inbuilt functions hexdec().We have to use this function that we can convert hex to decimal number.Many developers and programmers are using this tools in daily life.

Syntax:
base_convert($hexString,16,10);

For Example:

There are two ways to convert a hex string to a binary number using built-in functions:

First Way:

Use intval to convert the hexadecimal string to numeric binary, and then use strval to convert the numeric binary value to a decimal string:

$hexString = "18";
$binNumeric = intval($hexString,16);
$decString = strval($binNumeric); // = "24"

Second Way:

Use base_convert to convert the hexadecimal string directly to an decimal string:

$hexString = "28";
$decString = base_convert($hexString,16,10); // = "40"