Binary Decimal Hex Converter
Convert online binary, decimal, octal, and hexadecimal integers with register widths, byte order, two's complement checks, byte streams, and bit fields.Base Conversion Result
| Metric | Value | Copy |
|---|---|---|
| {{ row.label }} | {{ row.value }} |
| Area | Assessment | Recommendation | Copy |
|---|---|---|---|
| {{ row.area }} |
{{ row.severity }}
{{ row.status }}
|
{{ row.recommendation }} |
| Register metric | Value | Copy |
|---|---|---|
| {{ row.label }} | {{ row.value }} |
| Bit | State | Weight | Nibble (LSB=0) | Byte (LSB=0) | Role | Copy |
|---|---|---|---|---|---|---|
| {{ row.bit }} | {{ row.state }} | {{ row.weight }} | {{ row.nibble }} | {{ row.byte }} | {{ row.role }} |
| Width | Selected mode | Signed | Unsigned | Hex | Status | Copy |
|---|---|---|---|---|---|---|
| {{ row.width }} | {{ row.selected }} | {{ row.signed }} | {{ row.unsigned }} | {{ row.hex }} | {{ row.status }} |
| Offset | Hex | Dec | Binary | ASCII | Copy |
|---|---|---|---|---|---|
| {{ row.offset }} | {{ row.hex }} | {{ row.dec }} | {{ row.bin }} | {{ row.ascii }} |
| Window | Visible bytes | Big-endian read | Little-endian read | Takeaway | Copy |
|---|---|---|---|---|---|
| {{ row.window }} | {{ row.bytes }} | {{ row.big }} | {{ row.little }} | {{ row.takeaway }} |
| Field | Value | Copy |
|---|---|---|
| {{ row.label }} | {{ row.value }} |
By copying or publishing this embed code, you are responsible for how the tool appears and is used on your website.
- The embedded tool is provided for general informational and utility purposes only. It is not professional, legal, financial, medical, safety, or compliance advice.
- Results depend on the inputs, browser behavior, available data sources, and the current version of the tool. Review important results before relying on them.
- You are responsible for the surrounding page context, labels, instructions, privacy notices, accessibility, and any laws or policies that apply to your website.
- Do not embed the tool in a misleading, unlawful, harmful, or security-sensitive context.
- Simplified Tools may update, limit, suspend, or remove tools and embed behavior without prior notice.
- Analytics, network requests, cookies, browser storage, third-party services, and query parameters may apply depending on the tool and the embedding page.
If these terms do not work for your use case, do not embed the tool.
Introduction
Binary, decimal, octal, and hexadecimal are different written forms for the same integer value. The choice matters because humans often read decimal, hardware often exposes bits, and logs or protocols often use compact hexadecimal.
Base conversion becomes more than a text rewrite when fixed-width registers are involved. The same bit pattern can be unsigned, signed by two's complement, big-endian in memory, little-endian in a dump, or wrapped by a smaller register width.
A reliable conversion therefore needs both the numeric value and the interpretation rules: input base, sign mode, bit width, grouping, byte order, and optional field extraction.
Technical Details
The parser accepts one integer literal, removes visual separators such as spaces, underscores, commas, and apostrophes, then detects or enforces base 2, 8, 10, or 16. Prefixes 0b, 0o, and 0x are understood when compatible with the selected input base.
Fixed-width mode wraps the value into the selected register. Signed interpretation uses two's complement, where the highest bit is the sign bit and negative values wrap modulo 2 raised to the width. Native width mode instead chooses the minimum useful width for the entered integer.
| Unsigned maximum | 2^bits minus 1 |
| Signed range | -2^(bits - 1) through 2^(bits - 1) - 1 |
| Unsigned wrap | value modulo 2^bits |
| Two's complement negative | wrapped unsigned value minus 2^bits when sign bit is set |
| Hex density | one hex digit represents four binary bits |
Byte views are generated from the wrapped unsigned register value. Big-endian shows the most significant byte first; little-endian reverses that order for inspection. The bit-field extractor uses a least-significant-bit index, field width, and unsigned, signed, or sign-bit-aware interpretation.
Everyday Use & Decision Guide
Use auto-detect when pasting clear literals such as 0xff, 0b1010, or decimal numbers. Force the input base when a bare value could be ambiguous, especially strings made only of zeroes and ones.
- Use Base Conversions for decimal, binary, octal, and hex outputs.
- Use Register View when overflow, signed range, or two's complement matters.
- Use Bit Map to inspect set bits and byte positions.
- Use Byte Stream and Endian Audit when comparing dumps, packets, firmware values, or API payloads.
- Use field extraction when a register packs several flags into one integer.
Do not assume a negative decimal value and a large unsigned register value are different data. In a fixed-width register they may be two readings of the same bits.
Step-by-Step Guide
- Paste one integer literal and choose auto-detect or a strict input base.
- Select auto, signed, or unsigned interpretation.
- Choose native width, a preset width from 8 to 256 bits, or a custom width from 2 to 4096 bits.
- Set grouping, byte order, prefix display, uppercase hex, zero padding, and field extraction if needed.
- Copy rows or export CSV, DOCX, or JSON from the tab that matches your audit task.
Interpreting Results
Conversion Checks is the best place to spot ambiguity. It reports detection notes, fit warnings, and whether the value had to wrap at the chosen width.
Width Ladder shows which common register widths can hold the value signed or unsigned. A value that fits unsigned 8-bit may fail signed 8-bit because the top bit would mean negative.
Endian Audit changes byte order only. It does not change the integer's mathematical value unless another system reads those bytes in the opposite order.
Worked Examples
Unsigned byte. Enter 255, choose 8-bit unsigned, and include prefixes. The hex row shows 0xFF, the binary row shows eight set bits, and the signed 8-bit reading would be -1.
Protocol flag field. Enter 0xAC, use 8-bit width, set field LSB to 2 and field width to 3. The field output isolates bits 2 through 4 without hand-counting the binary string.
Endian mismatch. A byte stream 12 34 read big-endian is 0x1234. Reversing it for little-endian inspection explains why another tool may show 0x3412.
FAQ
Why did auto-detect treat my digits as binary?
A bare string containing only zeroes and ones is treated as binary in auto mode. Select decimal when the same characters are meant as a base-10 number.
What does fixed width change?
Fixed width emulates register wrapping. Values outside the chosen range are reduced modulo 2^bits for the register view.
Why are non-printable bytes shown as dots or escapes?
Bytes outside printable ASCII do not have safe visible characters. The policy selector controls whether they appear as . or as \xNN.
Does uppercase hex change the value?
No. It changes only the display of hexadecimal letters A through F.
Glossary
- Base
- The number of digit symbols used by a positional notation.
- Two's complement
- The common signed-integer encoding where the top bit marks negative values.
- Endian
- The byte order used when a multi-byte integer is stored or transmitted.
- Bit field
- A slice of bits inside a larger register.
References
- RFC 4648: Base-N Encodings, IETF.
- MDN BigInt reference, MDN Web Docs.
- MDN Number reference, MDN Web Docs.