Reading a byte count as hex
A file size or offset in decimal converts to the hex a debugger or hex editor would show, making the two views line up.
Convert a decimal number to hexadecimal in your browser, with full precision for large values.
Maintained by Roshan.
Converts decimal number to hexadecimal in this tab, with nothing sent anywhere.
Find related browser-local tools for nearby tasks without starting another search.
Browse all developer and data toolsConverting a decimal number to hexadecimal is a daily task once you work near the machine, because hex is how memory addresses, colour values, permission masks and byte counts are conventionally written. The reason is that hex lines up neatly with bytes - every two digits is one byte - in a way decimal never does. Most calculators handle small numbers fine and quietly fail on large ones, because they convert through a floating-point number that loses precision once the value passes about nine quadrillion. That is not an exotic edge case: 64-bit identifiers, hashes and timestamps in nanoseconds all live above it. This tool works in arbitrary-precision integers throughout, so a value of any size converts exactly, digit for digit.
A file size or offset in decimal converts to the hex a debugger or hex editor would show, making the two views line up.
A 64-bit ID converts exactly, where a calculator routing through floating point would round the last digits.
Yes. It uses arbitrary-precision integers, so a 64-bit or larger value converts exactly rather than being rounded.
Because two hex digits equal one byte, so memory addresses, colours and masks line up with the underlying bytes in a way decimal does not.
No. Only whole numbers. Hexadecimal fractions are rarely what is wanted.
It does not add one, since conventions vary. Prepend it yourself if needed.
Convert a hexadecimal number to decimal in your browser, with full precision for large values.
Convert a decimal number to binary in your browser, with full precision for large values.
Convert text to hexadecimal in your browser. Each character becomes its UTF-8 bytes in hex.