Tool to convert to hexadecimal base (base 16) or from hexadecimal base. Numbers written in hexa use digits from 0 to 9 and letters from a to f.
Hexadecimal (Base 16) - dCode
Tag(s) : Arithmetics, Informatics
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Hexadecimal is a numeration system (writing numbers) in base 16. Unlike the decimal system (base 10) which uses 10 digits (0 to 9), hexadecimal uses 16 symbols: the digits from 0 to 9 then the 6 letters from a to f i.e.: 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f
This system has been widely adopted in computing because it allows 1 byte (8 bits) to be written with 2 hexadecimal characters.
For complete explanations on how to convert from base 10 to base 16 (sixteen), see the base N conversion tool.
Example: $ 127_{(10)} $ (read 127 in base 10) is written $ 7f_{(16)} $ (7f in base 16)
Example: $ 255_{(10)} $ (read 255 in base 10) is written $ ff_{(16)} $ (ff in base 16)
For complete explanations on how to convert from base 16 to base 10, see the base N conversion tool.
Example: 123 in base16 represents $ 1 \times 16^2 + 2 \times 16^1 + 3 $ in decimal so is written 291 in base10.
Reminder: A=10, B=11, C=12, D=13, E=14, F=15.
In computing, all data is basically represented in binary form, that is, as numbers.
Hexadecimal numbers provide a more concise and readable way for humans to represent this binary data.
They are commonly used to represent data such as text, provided that each hexadecimal digit is associated with a specific character. This is especially the case in encodings like ASCII or Unicode, where each character is represented by a hexadecimal number.
On this page, dCode offers the conversion of hexadecimal numbers to base 10 (among others) but leaves the user the choice to use the encoding they wish. If necessary, pages dedicated to ASCII or Unicode code (which are the most common) are also available on dCode.
The hexadecimal numbers can have letters from a to f (sometimes capitalized).
In computing, it is usual to display a prefix 0x in front of the numbers to indicate that they are in base 16.
Example: 0x12 indicate that 12 is written in hexa (hexadecimal system)
HTML colors are coded by an RGB triplet coded in hex: each component (red, green, blue) goes from 00 to FF (0 to 255 in decimal).
dCode retains ownership of the "Hexadecimal (Base 16)" source code. Any algorithm for the "Hexadecimal (Base 16)" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Hexadecimal (Base 16)" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Hexadecimal (Base 16)" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Hexadecimal (Base 16)" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Hexadecimal (Base 16) on dCode.fr [online website], retrieved on 2025-04-15,