ToolzyLab ToolzyLab
๐Ÿ”ข Binary, octal, decimal, hexadecimal, and custom bases

Number Base Converter

Convert integers and fractions between bases 2โ€“36, inspect bit length and byte order, and switch between numeric and text representations.

Input Base Base 10
Output Base Base 2
Detected Type Integer
Bit Length 1 bit
Current Result 1

Decimal 1 converts to binary 1.

Smart Hint Paste any supported value

Supports prefixes like 0b1010, 0o17, 0xFF, negative values, and fractions such as 101.101 in compatible bases.

Number Base Converter Workspace

Clean pro layout with live conversion, custom bases, text mode, byte view, history, quick examples, and fully local browser processing.

๐ŸŸข Ready

Input Number

Enter any number using the selected source base. Prefixes like 0b, 0o, and 0x are automatically detected when enabled.

Numeric Mode Awaiting input
Source value Example: 255, 11111111, 0xFF, -1010.101
Reads 0b for binary, 0o for octal, and 0x for hexadecimal from the pasted input.
Adds 0b, 0o, or 0x when the destination base is 2, 8, or 16.
Useful for hex and other custom bases above 10.
When output base is binary, pads integer results to 8-bit groups for easier reading.

Converted Output

Live result in the destination base with grouped digits, prefix support, and clean formatting.

Converted Number

1111 1111

Decimal 255 equals binary 11111111.
Binary
1111 1111
Octal
377
Decimal
255
Hexadecimal
FF

Text โ‡„ Number Utilities

Convert plain text to bytes in the selected destination base, or decode integer byte values back into text.

Text input UTF-8 bytes
Decoded text Integer bytes
Encoded byte sequence
54 6F 6F 6C 7A 79 4C 61 62

Analysis

Detailed info about the parsed number.

Number Type
Integer
Sign
Positive
Integer Digits
3
Fraction Digits
0
Bit Length
8
Approx Decimal
255

Integer Byte View

Useful for low-level debugging and byte order inspection.

Big-endian bytes
FF
Little-endian bytes
FF

Quick Examples

Tap any example to load it instantly.

Common Tips

This tool supports more than the usual binary, octal, decimal, and hex workflow.

Use base 2 to 36 for custom numbering systems.
Fractions like 101.101 work too. Fraction precision is controlled by the precision selector.
For text encoding, the tool converts UTF-8 bytes into your selected output base.
The byte viewer works for non-negative integers and helps when debugging storage or protocol values.
Prefixes are handled smartly, so 0xFF and 0b1010 are super quick to paste.
Positional notation from binary through base 36

Convert integers and fractions between bases while checking prefixes, valid digits, precision, grouping, and text-byte mode

A number's value is independent of whether it is written in binary, octal, decimal, hexadecimal, or another positional base. Select source and target bases, optional prefix detection, fraction precision, grouping, case, and byte padding, then verify sign, digits, rounding, and whether text encoding is a separate operation.

Digits and prefixes

Each base permits digits only below its radix

Binary uses 0 and 1, octal 0 through 7, decimal 0 through 9, and hexadecimal adds A through F. Bases up to 36 can use letters for values above nine. Prefixes such as 0b, 0o, and 0x are notation conventions; auto-detection should be disabled when those characters are data.

Fractions

Fractional conversion can require rounding because expansions may repeat

A finite decimal fraction can become a repeating binary or another-base fraction. Precision controls the number of output fractional digits, not the mathematical exactness. Keep enough digits for the application and avoid floating-point conversion for financial or high-precision scientific values without a suitable numeric library.

Text mode

Encoding text as numbers is a byte conversion layered on top of base notation

Characters first become bytes under an encoding such as UTF-8, and each byte can then be displayed in the chosen base. Decoding must preserve byte boundaries, padding, and the same charset. A large integer converted to text is not automatically a valid or readable byte sequence.

Practical review

Base conversion check

Convert the result back to the source base and compare the intended numeric value.

  • Confirm source base, target base, sign, prefix handling, and allowed digits.
  • Review uppercase or lowercase letters and grouping as presentation only.
  • Set enough fraction precision and note any rounded repeating expansion.
  • Preserve byte padding and UTF-8 boundaries in text encode or decode mode.
  • Use exact numeric libraries for values beyond safe runtime precision.
Number base questions

Binary, octal, hex, prefixes, fractions, base 36, precision, and text bytes

What does the base of a number mean?

It is the number of digit values used in positional notation. Each position represents a power of that base.

Why is the digit 8 invalid in octal?

Base 8 has digit values zero through seven. A digit equal to or greater than the base is invalid.

What do 0b, 0o, and 0x prefixes mean?

They commonly mark binary, octal, and hexadecimal notation in programming contexts. The prefix is not part of the numeric value.

Why does a converted fraction end with rounding?

Some fractions repeat indefinitely in another base. The precision setting limits displayed digits and therefore rounds or truncates the expansion.

What is base 36 used for?

It uses digits and letters to write integers compactly, often for short identifiers. It is encoding notation, not encryption.

Is converting text to a base the same as converting one number?

No. Text is first encoded into bytes, then each byte or combined sequence is represented in the base. Encoding and boundaries must match when decoding.