Skip to main content
Toollyz

Search tools

Search for a command to run...

Hexadecimal Converter

Convert any number between binary, octal, decimal and hexadecimal. BigInt-backed for arbitrary precision — 64-bit and 128-bit values round-trip without rounding errors. Auto-detects 0x / 0o / 0b prefixes. Step-by-step conversion display. 100% offline.

What is the Hexadecimal Converter?

Hexadecimal Converter is a bidirectional base 2 / 8 / 10 / 16 converter built on JavaScript BigInt, so it round-trips arbitrarily large numbers without precision loss. Type a number with no prefix and pick the base hint, or paste with `0x` / `0o` / `0b` and we auto-detect. Underscores, commas and spaces are ignored — `0x_DEAD_BEEF` and `0xDEADBEEF` parse identically. Output shows all four bases at once: binary (grouped in 4-bit nibbles for readability), octal (3-digit groups), decimal (with thousands separators), and hex (with uppercase A-F by default, optionally lowercase). Per-base options include UPPERCASE hex, group-digits-for-readability, and a step-by-step display that shows the divide-by-base remainders for educational use. Stats include bit length (number of bits required to hold the absolute value), and 'fits u32' / 'fits i64' flags to help engineers spot when a value won't fit a fixed-width integer.

How to use it

  1. Type a number — with or without a `0x` / `0o` / `0b` prefix.
  2. Pick a source base hint (or leave on auto-detect).
  3. Read all four base representations side-by-side.
  4. Toggle UPPERCASE hex, digit grouping, and step-by-step conversion display.

Benefits

  • BigInt under the hood — arbitrary-precision conversions, no rounding errors for 64+ bit values.
  • Auto-detects `0x` (hex), `0o` (octal), `0b` (binary) prefixes.
  • Ignores underscores, commas and spaces in input — `0x_DEAD_BEEF` works.
  • Four output bases shown at once: binary, octal, decimal, hexadecimal.
  • Configurable digit grouping (4-bit nibbles for binary, 3-digit groups for decimal).
  • Bit-length, fits-u32 and fits-i64 flags for engineers checking integer-width limits.
  • Step-by-step decimal → hex conversion display for educational use.
  • Handles negatives with minus-sign convention (not two's complement).
  • Runs 100% in your browser — Toollyz has no server.

Frequently asked questions

Why BigInt instead of regular numbers?

JavaScript's regular `Number` type loses precision above 2^53 (≈9 quadrillion). BigInt has arbitrary precision — important when converting 64-bit hashes, UUIDs, IPv6 fragments or any number bigger than ~16 decimal digits.

Can I convert negative numbers?

Yes — prefix with `-`. We use the minus-sign convention (signed magnitude), not two's complement. The displayed binary, octal and hex all carry the minus sign.

What's the difference between `0x` and `0X`?

None — we accept both. Same for `0o`/`0O`, `0b`/`0B`.

What's the largest number it handles?

BigInt has no fixed maximum — limited only by browser memory. Numbers with thousands of digits work, just slowly. Display gets unwieldy past a few hundred digits.

What does 'fits u32' mean?

Whether the value fits in a 32-bit unsigned integer (0 to 2^32 - 1 = 4,294,967,295). Useful when feeding values into systems that expect 32-bit ints.

And 'fits i64'?

Whether the value fits in a 64-bit signed integer (-2^63 to 2^63 - 1). Most modern languages use i64 as their default integer type.

How do I group binary digits?

Toggle 'Group digits' — binary groups into 4-bit nibbles (a hex digit each), octal into 3-bit groups, decimal into 3-digit groups.

Why uppercase hex by default?

It's the convention in most programming languages, RFC documents and crypto libraries. Toggle off for lowercase output.

Show me the conversion steps?

Enable 'Show conversion steps' — we print a table of the divide-by-16 algorithm: at each step we divide the current value by 16 and record the remainder. Read the remainders bottom-up to get the hex digits.

Does it handle floating-point numbers?

Not in this version — BigInt is integers only. For float-to-hex (IEEE 754 representation), you'd need a specialised tool.

Is anything uploaded?

No. Conversion is a pure browser computation.