Number Base Converter Tool - Binary Decimal Hex Octal Converter with Bit Visualization

First Published:
Last Updated:

This tool converts numbers between binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), and any arbitrary base from 2 to 36 in real time. It supports arbitrarily large numbers via BigInt, provides an interactive bit visualization grid where you can click individual bits to toggle them, and includes a bitwise operations calculator with visual bit-level display.

All processing is performed entirely in your browser using client-side JavaScript. No data is transmitted to any server. Your input never leaves your device.

  • This tool is provided "AS IS" without any warranties of any kind.
  • The author accepts no responsibility for incorrect conversions used in production systems.
  • Always verify critical calculations independently.
  • By using this tool, you accept full responsibility for any outcomes.

This tool uses client-side JavaScript for all processing. No data is transmitted to servers, no files are uploaded online, all processing happens locally in your browser. Once loaded, this tool continues to work even without an internet connection. For more details, please refer to our Web Tools Disclaimer.

Interactive Bit Visualization

Click any bit to toggle it. Hex nibble values are shown below each 4-bit group.

Bits used: 0 / 8
Signed (Two's Complement)
0
Unsigned
0

Bitwise Operations Calculator

Supports prefixes: 0b (binary), 0o (octal), 0x (hex). Unprefixed values are treated as decimal.

Operand A
Operand B
Result

BIN: -
DEC: -
HEX: -

Features

  • Real-time simultaneous conversion — Type in any field (binary, octal, decimal, hex, or custom base) and all other fields update instantly as you type.
  • Arbitrary base support (2–36) — Convert to and from any number base from 2 to 36 using the custom base selector.
  • BigInt support — Handle arbitrarily large integers beyond JavaScript's Number.MAX_SAFE_INTEGER limit.
  • Interactive bit visualization — Click individual bits to toggle them on or off. Hex nibble values are displayed below each 4-bit group for instant correlation.
  • Signed and unsigned integer display — View two's complement signed and unsigned interpretations for 8, 16, 32, or 64-bit widths with overflow detection.
  • Bitwise operations calculator — Perform AND, OR, XOR, NOT, left shift (<<), and right shift (>>) with visual bit-level display of operands and result.
  • Grouped digit display — Toggle automatic grouping for readability (binary in 4-bit groups, decimal with commas, hex in 4-digit groups).
  • Prefix auto-detection — The bitwise calculator accepts 0b, 0o, and 0x prefixes to specify the input base.
  • Per-field copy buttons — Copy any individual conversion result to the clipboard with one click.
  • Negative number support — Enter negative decimals and see the corresponding two's complement representation in the bit grid.
  • Uppercase toggle — Switch between lowercase and uppercase hex digits (a-f vs. A-F).
  • Client-side only — All processing happens in your browser. No data is sent to any server.

How to Use

  1. Convert numbers: Type a number into any field (Binary, Octal, Decimal, Hex, or Custom Base). All other fields update in real time. You can include spaces, underscores, or common prefixes (0b, 0o, 0x) — they are automatically stripped.
  2. Use the bit grid: Click any bit cell to toggle it between 0 and 1. All conversion fields and the signed/unsigned display update immediately. Select a bit width (8, 16, 32, or 64) to change the grid size.
  3. Check signed vs. unsigned: Below the bit grid, the “Signed (Two's Complement)” and “Unsigned” displays show how the current bit pattern is interpreted at the selected bit width. An overflow warning appears if the value exceeds the selected bit width.
  4. Perform bitwise operations: Enter values in Operand A and Operand B (with optional 0b/0o/0x prefixes), select an operation (AND, OR, XOR, NOT, <<, >>), and click Calculate. The result is shown in binary, decimal, and hex, with a visual bit-level breakdown.
  5. Copy results: Click the clipboard icon next to any field to copy its value (formatting is stripped for clean output).

Important Notes

  • This tool uses JavaScript BigInt for arbitrary-precision integer arithmetic. There is no upper limit on the number of digits.
  • The bit visualization grid and signed/unsigned display are bounded by the selected bit width (8, 16, 32, or 64 bits). Values exceeding the selected width are truncated (with an overflow indicator).
  • For the bitwise operations calculator, shift amounts must be within the selected bit width range.
  • Floating-point numbers are not supported. This tool works with integers only.
  • This tool is designed for educational and development use. Always verify critical calculations independently.

References:
Tech Blog with curated related content
Web Tools Collection

Written by Hidekazu Konishi