Hex to Decimal Converter — Instant Hexadecimal to Base-10
Convert hexadecimal numbers to decimal instantly. Supports arbitrary precision via BigInt, handles 0x prefix. Free, runs in your browser.
Supports arbitrary-precision integers via BigInt — no 2⁵³ overflow. Handles negative numbers and the standard 0b/0o/0x prefixes. All conversion happens in your browser.
Converting hex to decimal, explained
Hexadecimal (base 16) is the most common number system after decimal in programming. A hexadecimal number uses the digits 0-9 and the letters A-F, where A represents 10, B is 11, and so on up to F which represents 15. Converting hex to decimal means rewriting the number in the familiar base-10 system that humans count with. This hex to decimal converter does the conversion instantly in your browser with arbitrary precision — it can handle 256-bit cryptographic values and 512-bit hashes as easily as a two-digit RGB channel.
The conversion formula
To convert a hex number to decimal by hand, multiply each digit by the power of 16 matching its position (counting from the right, starting at 0), then sum the results. For example, to convert 2A3 to decimal:
2 × 16² + A × 16¹ + 3 × 16⁰ = 2 × 256 + 10 × 16 + 3 × 1 = 512 + 160 + 3 = 675
So hex 2A3 equals decimal 675. For large numbers, doing this by hand is tedious and error-prone; the tool above does it instantly and keeps full precision even for 256-bit inputs.
How to use this hex to decimal converter
- Type or paste a hexadecimal number into the hex field. Upper or lowercase is fine —
FF,ff, andFfall convert to decimal 255. - The decimal field updates live with the base-10 equivalent. Binary and octal values also appear for reference.
- A
0xprefix is optional; paste0x1Aor1A, both work. - Invalid characters (anything outside 0-9, A-F) surface an inline error so you know exactly what went wrong.
Examples
Hex Decimal FF 255 # one byte 100 256 FFFF 65535 # uint16 max DEADBEEF 3735928559 # famous debug magic number 0x1A 26 # prefix is fine ABCDEF0123456789 12379813812177893257 # big, handled
The tool uses JavaScript BigInt internally, so values past Number.MAX_SAFE_INTEGER (2^53 - 1) stay exact. This matters for cryptographic keys, SHA-256 digests, and any hex-encoded 64-bit or wider value.
Why hex exists and why developers use it
Computers process bits. Humans find long bit strings unreadable (10101010), so hex emerged as a compact alternative: every group of 4 bits maps to exactly one hex digit, and every byte (8 bits) maps to exactly two hex digits. That makes hex the natural notation for:
- Memory addresses. A 64-bit address shown in hex is 16 characters (
0x7ffe8c0d1a40); in decimal it would be up to 20 digits with no byte boundary visible. - Byte values. Every byte is two hex digits, making hex dumps naturally aligned.
- Cryptographic hashes. SHA-256 produces 32 bytes, shown as 64 hex characters.
- RGB colors. CSS uses
#RRGGBBwhere each channel is a byte in hex. - Register values in debuggers. Assembly, disassembly, and debugger outputs show values in hex by convention.
Converting to decimal is typically needed when you want to compare against a human-written value, plug a number into a formula, or explain a result to a non-engineer.
Common hex to decimal conversions
1 = 1 A = 10 F = 15 10 = 16 FF = 255 100 = 256 1000 = 4096 FFFF = 65535 10000 = 65536
Privacy
This hex to decimal converter runs entirely in your browser. Numbers are parsed and converted locally via JavaScript BigInt. Nothing is sent to a server, nothing is logged. Safe to paste any value you are working with — memory addresses, private key fragments, hash fingerprints.
Frequently asked questions
Does the 0x prefix matter?
No. The tool strips a leading 0x automatically. Both 0xFF and FF convert to 255.
Is there a limit on the hex value size?
No practical limit. The tool uses JavaScript BigInt, which supports arbitrary-precision integers. Pasting a 1024-character hex value (a 4096-bit number) converts correctly.
How do negative hex numbers work?
Hex itself is unsigned; negative values are represented by their two's complement in a fixed bit width (e.g., 0xFFFFFFFF as a signed 32-bit integer is -1). This tool treats hex input as unsigned. If you need signed interpretation, compute it as value − 2^N where N is your bit width.
Why is A = 10 and F = 15?
Hex needs 16 distinct digits. The digits 0-9 cover the first 10; the next 6 values are assigned the letters A-F by convention because they were the easiest symbols to add to a typewriter and a 6-bit character code in the 1960s.
What is the difference between hex and base64?
Both encode binary data as ASCII text. Hex uses 16 symbols and each byte becomes 2 characters (33% efficiency worse than binary). Base64 uses 64 symbols (A-Z, a-z, 0-9, +, /) and each 3 bytes become 4 characters (75% efficiency). Use hex when human readability and byte alignment matter; use base64 when transport efficiency matters.
Related tools
- Number BaseConvert numbers between binary, octal, decimal, and hexadecimal instantly. Live bidirectional conversion with explanations — free, runs in your browser.
- Decimal to HexConvert decimal numbers to hexadecimal instantly. Arbitrary precision via BigInt, outputs lowercase hex. Free, runs entirely in your browser.
- Hex to BinaryConvert hexadecimal numbers to binary instantly. Each hex digit maps to 4 bits. Free, runs entirely in your browser, zero dependencies.