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
Run
Processes in this browser; cancel at any time
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
- Under “Add text”, enter one number per line, or select Use example.
- Choose a “Direction”: “Decimal to bits” or “Bits to decimal”.
- Pick the “Precision”: “Single (32-bit)” or “Double (64-bit)”. For data from a little-endian device, set “Hex byte order” to “Little-endian”.
- 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.
Related tools
Number base converter
Convert integers of any size between bases 2 and 36, one per line, with optional two’s complement for signed 8 to 128-bit values.
Sign-magnitude, ones’ and two’s complement
Sign-magnitude, ones’ complement and two’s complement of decimal integers, one per line, at 8, 16, 32 or 64 bits.
Byte radix and endianness converter
Convert bytes between hex, binary, octal, unsigned or signed decimal, Base64 and UTF-8 text, and swap byte order between big and little endian in 2, 4 or 8-byte words.
Character set encoding and mojibake repair
Show the bytes of text in UTF-8, GBK, GB18030, Big5, Shift_JIS and more as hex, turn hex back into text, or repair mojibake from text read in the wrong character set.
File to hex
Show any file as hex: a hexdump with offsets and an ASCII preview, plain hex, or a C byte array.
Encode and decode text
Encode or decode Base64, Base64URL, URL, hexadecimal or HTML entities. Encoding is not encryption.