Skip to content
Hexadecimal Converter

About Hexadecimal Converter

Hexadecimal Converter is a free set of tools for moving numbers and text between bases: one panel that edits hex, decimal, binary, octal and any base from 2 to 36 together, a page for each common pair with its hand method, text and hex in both directions, a hex calculator and a 0–255 chart. This page describes how the results are computed so you can decide how far to trust them.

Everything runs in your browser

The pages are static files. When you type, the conversion happens in JavaScript on your device and nothing you enter is sent anywhere. The same code runs once while the site is built, which is how each page can show a finished example even with scripts turned off.

Whole numbers are exact at any length

Integers are held as arbitrary-precision BigInt values, never as floating-point numbers, so there is no rounding at 253 or anywhere else. Input is limited to 2,048 characters to keep the page responsive; that is still a number with thousands of bits.

Fractions are exact, then capped and labelled

A value with a point is stored as an exact ratio of two integers. Converting it to another base is long division, and the converter remembers every remainder it has seen. When one comes back, the digits from that point repeat forever and are shown in brackets: one tenth in hex is 0.1(9). If no remainder repeats within 64 digits, the output stops there and says “truncated at 64 digits”. Nothing is rounded silently. Input fractions are limited to 64 digits after the point.

Negative numbers: sign or two’s complement

With the bit width set to Any, a negative number is written with a minus sign, as in −2A. Choosing a width of 8, 16, 32, 64 or any custom size up to 1,024 bits switches to two’s complement, the way processors store signed integers: hex, binary and octal show the bit pattern of that width, and decimal shows the signed value with the unsigned reading beneath it. A value that needs more bits than the width is reported as an error rather than cut down. Fractions cannot be combined with a width.

Text follows the published standards

ASCII is decoded and encoded as defined in RFC 20, the 1969 description of the 7-bit code. UTF-8 follows RFC 3629: overlong forms, surrogate code points and values above U+10FFFF are rejected, and each invalid sequence becomes U+FFFD with its byte offset reported. The UTF-8 decoder is written for this site and tested against the browser’s own decoder on valid input. Control character names in the chart follow ISO/IEC 6429 and the Unicode name aliases.

Tested before every release

The conversion code has automated tests with full line and branch coverage, including thousands of random round trips across bases 2 to 36 and every boundary of the standard widths. The worked examples on each page are checked against the same code. If you find a result that looks wrong, the contact page says how to report it.

Sources

The standards and references the tools and explanations rely on:

Last updated