Convert between floating point, integer, and custom formats
This interactive converter helps you visualize how floating-point and integer numbers are represented at the binary level. This converter follows the IEEE 754 floating-point standard and supports standard formats (FP64, FP32, FP16) as well as specialized formats used in machine learning and AI (BF16, TF32, FP8 E4M3, FP8 E5M2). Integer formats commonly used in ML quantization are also supported (INT32, INT16, INT8, INT4, and their unsigned variants). Custom formats can be used as well by specifying the number of sign, exponent, and mantissa bits. This tool is mobile-friendly and supports screens of all sizes.
When converting between formats, you can choose from the five IEEE 754 rounding modes: round to nearest (ties to even), round to nearest (ties away from zero), round toward zero (truncation), round toward +infinity (ceiling), and round toward −infinity (floor). These modes apply when converting the represented input value to the output format.
You can also choose what happens when a value is too large for the target format. Overflow produces ±Infinity, or NaN in a format that has NaN but no Infinity (such as FP8 E4M3). Saturate clamps to the largest finite value instead, which is the SAT mode required by the OCP OFP8 specification. The default is the output format's own standard behavior, which the option text names explicitly. Note that IEEE 754 makes overflow rounding-mode dependent: a directed rounding mode pointing toward zero clamps a finite overflow to the largest finite value no matter which overflow behavior is selected.
The tool also reports the precision loss of each conversion as the absolute and relative error between the input value and its output representation. Value presets let you explore special cases like zero, infinity, NaN, subnormals, and the smallest and largest representable numbers.
Two buttons at the top of the Input Format panel control how the page looks and how much of it is shown. The first switches between Basic and Advanced mode. Basic keeps things focused on the essentials: the format presets, the value in decimal, binary, and hexadecimal, and the precision loss. Advanced adds everything else, including custom bit layouts, the sign/exponent/mantissa breakdown for both formats, and the rounding and overflow controls. Until you press the button the choice follows your screen, so a wide window starts in Advanced and a phone starts in Basic. The second button switches between light and dark themes; leave it untouched and the page simply follows your operating system's preference. Either choice, once made, is remembered on your next visit, and a chosen view mode travels with a shared link.
Click any format name to read a detailed guide on how it works, with interactive visualizers and technical breakdowns.
Every conversion is encoded in the page URL, so a conversion is easy to bookmark or share. As you change the input format, output format, value, or rounding mode, the address bar updates automatically. Copy it to share the exact state you are looking at, or click the button below to copy it to your clipboard.