Number Base Converter (Hex, Dec, Bin, Oct)
Convert numbers between Decimal, Hexadecimal, Binary, and Octal formats instantly in real-time.
Bit Anatomy & Architecture Representations
Non-ASCII
-1
0xFF
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
- Type a value into the field for the base you already have.
- Read the equivalent value in the other three bases.
- 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.
Related tools
- Color PickerFree online color picker and palette generator. Convert between HEX, RGB, HSL, and HSV color codes with WCAG contrast ratio analysis and tint/shade swatches.
- Encoder & DecoderFree online encoder and decoder tool. Encode and decode URL percent-encoding, Base64 strings, and HTML entities instantly in your browser with zero server uploads.
- GeneratorsFree online developer generator suite. Generate cryptographically secure passwords, UUID v4 identifiers, SHA-256 / MD5 hashes, and lorem ipsum placeholder text.
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.