TRY ONLINE

Default conversion from hexadecimal to decimal. For other bases, use the CLI command with --base-in flag.
Hex
Decimal
Decimal output will appear here

EXAMPLES

Convert to decimal:
cast to-dec ff
255
Works with or without 0x prefix:
cast to-dec 0xff
255
Default is converting from hex but you can specify a different base. Binary here:
cast to-dec 1010 --base-in 2
10
Base 16:
cast to-dec 0x1a2b3c4d5e6f --base-in 16
28772997619311

DOCUMENTATION

cast to-dec


NAME

cast-to-dec - Converts a number of one base to decimal

SYNOPSIS

cast to-dec [options] value

DESCRIPTION

Converts a number of one base to decimal

OPTIONS

--base-in base_in     The input base.

Common Options

-h
--help
    Prints help information.

EXAMPLES

  1. Convert ff in hexadecimal to decimal
    cast to-dec ff
    

SEE ALSO

cast