YourTools.
简体中文
Back to the catalog
Tools

IEEE 754 float converter

Show the single or double-precision bits of decimal numbers, or read hex and binary bit patterns back as numbers, one per line.

Process locally

Files stay in this browser session. Closing or clearing releases them.

Add text

Type or paste the text to process

Adjust settings

Optional: Direction, Precision, Hex byte order

IEEE 754 float converter

Run

Processes in this browser; cancel at any time

Add text first

About this tool

See how decimal numbers are stored as IEEE 754 single-precision (32-bit) or double-precision (64-bit) floats, or turn hex and binary bit patterns back into numbers. Use it to understand why 0.1 cannot be stored exactly, to decode a 4-byte float read from a sensor, a serial port or a file, or to check float and double values in your code.

Each number shows the value actually stored, its hex, its binary split into sign, exponent and fraction, and the sign and exponent. Hex can be big-endian or little-endian. Put one number per line; everything runs in your browser.

How to use it

  1. Under “Add text”, enter one number per line, or select Use example.
  2. Choose a “Direction”: “Decimal to bits” or “Bits to decimal”.
  3. Pick the “Precision”: “Single (32-bit)” or “Double (64-bit)”. For data from a little-endian device, set “Hex byte order” to “Little-endian”.
  4. Select Run, check each number in the preview, then download the results as a text file.

Formats and limits

Input
Text
Output
Plain text
Size limit
1 MB
Settings
Direction (Decimal to bits, Bits to decimal); Precision (Single, Double); Hex byte order (Big-endian, Little-endian)
Privacy
Files stay in the current browser session. No file bytes are uploaded.
Price
Free, no sign-up

Common questions

Why does 0.1 become 0.10000000149011612?

0.1 has no exact binary form, so the nearest value is stored. In single precision that is 0.10000000149011612 (hex 3DCCCCCD); double precision gets closer and shows 0.1, with hex 3FB999999999999A.

What does the byte order change?

Only the hex line, for both input and output. For example, 1 in single precision is 3F800000 big-endian and 0000803F little-endian. Binary is always shown and read with the most significant bit first.

What should I enter to convert bits to a number?

For single precision, 8 hex digits or 32 binary digits; for double precision, 16 hex digits or 64 binary digits. A 0x prefix is fine, and spaces and underscores are ignored. A pattern of the wrong length stops the run with an error.

Can it handle infinity and NaN?

Yes. Enter inf, -inf, infinity or nan in any letter case. Numbers too large for single precision, such as 1e40, become Infinity, and -0 is shown as -0.

What is the exponent in the result?

The Binary line separates the sign bit, exponent bits and fraction bits with spaces. Sign gives the sign bit, and exponent is the stored exponent minus the bias (127 for single, 1023 for double); for 0.1 it is -4.