Strinza

Number Base Converter (Hex, Dec, Bin, Oct)

Convert numbers between Decimal, Hexadecimal, Binary, and Octal formats instantly in real-time.

Presets:
Digits: 0-9Radix: 10
Prefix: 0xFFRadix: 16
Prefix: 0b11111111Radix: 2
Prefix: 0o377Radix: 8

Bit Anatomy & Architecture Representations

8 bits • 1 byte
Interactive 8-Bit Matrix (Click bit to toggle):Least Significant Byte (LSB)
ASCII Representation

Non-ASCII

Signed int8 (Two's Complement)

-1

Code Literal (C / JS / Python)

0xFF

Unsigned 16-bit / 32-bit

255 / 255

Number Systems & Radix Base Conversion Guide

Convert numerical values across standard computing bases used in memory addressing, bitwise operations, and low-level programming.

1. Base 10 (Decimal)

Standard human numerical system with digits 0-9. Positional values scale as powers of 10 (10^0, 10^1, 10^2).

2. Base 16 (Hexadecimal)

Uses digits 0-9 and letters A-F. Widely used for memory pointers, byte offsets, and RGB color hex codes.

3. Base 2 (Binary)

Uses bits 0 and 1. Fundamental machine data representation for digital logic circuits, registers, and flags.

4. Base 8 (Octal)

Uses digits 0-7. Commonly used in POSIX Unix filesystem permission bitmasks (e.g. chmod 755 or 644).

About the Number Base Converter

The Number Base Converter shows the same value simultaneously in binary, octal, decimal and hexadecimal. It is the quickest way to read a bitmask from a permissions field, translate a hex colour component or memory offset into decimal, or check how a flag enum lines up in binary. Enter a value in any base and the other representations update immediately.

How to use the Number Base Converter

  1. Type a value into the field for the base you already have.
  2. Read the equivalent value in the other three bases.
  3. Copy whichever representation you need.

Frequently asked questions

Why do hexadecimal values start with 0x?

The 0x prefix is a convention from C that tells a compiler or reader the digits that follow are base 16 rather than base 10. Similar prefixes exist for binary (0b) and octal (0o). The prefix is notation only and is not part of the value.

How large a number can I convert?

Values are handled with arbitrary-precision integer arithmetic, so conversions remain exact well beyond the 2^53 limit of a standard JavaScript number. Fractional values are not supported.

Why is hexadecimal used for colours and memory addresses?

Each hex digit maps to exactly four bits, so one byte is always two hex digits. That makes byte boundaries visible at a glance, which is far more readable than the long digit strings decimal produces for the same value.

Number Base Converter is free to use with no account, no ads and no usage limits. Every calculation runs locally in your browser, so nothing you paste is ever uploaded. See our privacy policy.