Velto
Converters

Hex Converter

This hex converter takes a number in any base and shows it in all four at once: decimal, hexadecimal, binary and octal. It reads the input base from prefixes like 0x, handles values up to 64 bits, and gives each base its own copy button.

Decimal

255

Hexadecimal

0xFF

Binary

1111 1111

Octal

377

Input read as:
Decimal

Examples

How to use

  1. 1

    Type a value such as 255, 0xFF, 1010 or 0o777.

  2. 2

    Let auto-detect read the base, or set it with the dropdown for ambiguous values.

  3. 3

    Read the four panels: decimal, hex, binary and octal update as you type.

  4. 4

    Copy the base you need with its button, or download the full conversion.

How do you convert hex to decimal?

Hexadecimal is base 16: the digits 0 to 9 plus the letters A to F, where A is 10 and F is 15. Programmers reach for it because one hex digit maps to exactly four bits, so a byte of 8 bits is always two hex digits. The binary 11111111 is a mouthful, yet in hex it is just FF.

To turn hex into decimal, multiply each digit by its power of 16. Take 0xFF: the first F is 15 x 16 = 240, the second F is 15 x 1 = 15, and 240 + 15 = 255. A longer one, 0x1A3, works out to 1 x 256 + 10 x 16 + 3 = 419.

How do you convert decimal to hex?

Go the other way by dividing the number by 16 over and over, keeping each remainder. For 255: 255 / 16 = 15 remainder 15, then 15 / 16 = 0 remainder 15. Read the remainders bottom to top, 15 then 15, which is FF. The tool runs the division for you and shows binary (11111111) and octal (377) at the same time, so you never convert twice.

What does one number look like in four bases?

DecimalHexBinaryOctal
10A101012
64401000000100
255FF11111111377
40961000100000000000010000
65535FFFF1111111111111111177777

How does base detection work?

Prefixes win first: 0x means hex, 0b means binary, 0o means octal, the notation most languages use. Without a prefix, any letter from A to F marks the value as hex. A run of only 0s and 1s longer than three digits reads as binary. Everything else reads as decimal.

Watch out for ambiguous values

A value like 101 is legal in all four bases: 101 in decimal, 257 from hex, 5 from binary, 65 from octal. Auto-detect treats short 0/1 strings as decimal, so reach for the dropdown to force binary when that is what you mean. The same goes for 10, which reads as decimal ten rather than binary two.

How large a number can it handle?

The converter runs on BigInt arithmetic, so it stays exact up to 18,446,744,073,709,551,615 (0xFFFFFFFFFFFFFFFF), the largest unsigned 64-bit value. Ordinary JavaScript numbers lose precision past 2^53, which is how many online converters quietly corrupt long hashes and memory addresses. This one refuses anything beyond 64 bits instead of rounding it.

Where do you meet each base?

Hex turns up in CSS colors (#FF6600), memory addresses, MAC addresses and hash digests. Binary shows up in permission masks and low-level debugging. Octal survives mainly in Unix file permissions, where chmod 755 is octal for rwxr-xr-x. Decimal is what everyone else uses. Moving between them is daily work for anyone reading logs or writing drivers.

ASCII Table

CharDecimalHexBinaryName
NUL00000000000Null
SOH10100000001Start of Heading
STX20200000010Start of Text
ETX30300000011End of Text
EOT40400000100End of Transmission
ENQ50500000101Enquiry
ACK60600000110Acknowledge
BEL70700000111Bell
BS80800001000Backspace
HT90900001001Horizontal Tab
LF100A00001010Line Feed
VT110B00001011Vertical Tab
FF120C00001100Form Feed
CR130D00001101Carriage Return
SO140E00001110Shift Out
SI150F00001111Shift In
DLE161000010000Data Link Escape
DC1171100010001Device Control 1 (XON)
DC2181200010010Device Control 2
DC3191300010011Device Control 3 (XOFF)
DC4201400010100Device Control 4
NAK211500010101Negative Acknowledge
SYN221600010110Synchronous Idle
ETB231700010111End of Transmission Block

Parameters

Every field of this tool can be prefilled from the URL. Use these query parameters:

ParameterTypeDefault
valuestring255
fromauto | dec | hex | bin | octauto

Example : https://www.veltotools.com/conversion/hex-converter?value=255

API

The same tool is available as a free JSON API, with the same parameters as above. No key, no sign-up.

GET https://www.veltotools.com/api/v1/conversion/hex-converter?value=255
$ curl "https://www.veltotools.com/api/v1/conversion/hex-converter?value=255"

Frequently asked questions

Updated Jul 17, 2026

Related tools