Skip to main content

Number Base Converter Convert numbers between any bases from 2 to 36, including binary, octal, decimal, and hex.

Number Base Converter illustration
🔢

Number Base Converter

Convert numbers between any bases from 2 to 36, including binary, octal, decimal, and hex.

1

Enter a Number

Type the number you want to convert.

2

Set Source Base

Select or type the base of your input number (2 to 36).

3

Choose Target Base

Select the base to convert to and view all common conversions.

Loading tool...

What Is Number Base Converter?

The number base converter transforms numbers between different positional numeral systems (radixes). While we typically use base-10 (decimal) in everyday life, computers use base-2 (binary), and programmers frequently work with base-8 (octal) and base-16 (hexadecimal). This tool supports conversion between any base from 2 to 36, where bases above 10 use letters A-Z as additional digits. Common conversions include binary ↔ decimal (essential for understanding digital logic), decimal ↔ hex (used in programming and web colors), and any custom base for specialized applications like base-36 encoding (which uses all alphanumeric characters). The converter shows the result in all four common bases (binary, octal, decimal, hex) simultaneously, making it a one-stop tool for number system work.

Why Use Number Base Converter?

  • Converts between any base from 2 to 36
  • Preset buttons for common bases (2, 8, 10, 16)
  • Shows all four common bases simultaneously
  • Validates input characters against the selected base
  • Custom base input for specialized applications

Common Use Cases

Programming

Convert between binary, hex, and decimal for debugging and code development.

Computer Science Education

Learn and practice number base conversions for CS courses.

Data Encoding

Work with base-32, base-36, or other encoding systems.

Digital Electronics

Convert between binary and other representations for circuit design.

Technical Guide

Number base conversion works in two steps: (1) Convert the input to an intermediate decimal (base-10) representation by computing Σ(dᵢ × base^i) where dᵢ is the digit at position i. (2) Convert from decimal to the target base by repeatedly dividing by the target base and collecting remainders. For bases above 10, digits beyond 9 are represented as A=10, B=11, ..., Z=35, supporting up to base-36. The converter validates that each character in the input is a valid digit for the specified base. JavaScript's parseInt(value, radix) handles the first step, while toString(radix) handles the second. Both support radixes from 2 to 36 natively. The converter works with positive integers; negative numbers are handled by converting the absolute value and preserving the sign.

Tips & Best Practices

  • 1
    Binary (2), octal (8), and hex (16) are all powers of 2, making conversions between them straightforward
  • 2
    Each hex digit = 4 binary bits; each octal digit = 3 binary bits
  • 3
    Base-36 uses all digits (0-9) and letters (A-Z) — useful for compact encoding
  • 4
    Invalid characters for the selected base will produce an error
  • 5
    The maximum supported base is 36 (0-9 plus A-Z)

Related Tools

Frequently Asked Questions

Q How do I convert binary to decimal?
Multiply each bit by 2 raised to its position power (right to left, starting at 0) and sum. For example, 1101 = 1×8 + 1×4 + 0×2 + 1×1 = 13.
Q What bases does this support?
Any base from 2 to 36. Bases 2-10 use digits 0 through base-1. Bases 11-36 additionally use letters A through Z.
Q What is base-36 used for?
Base-36 uses all alphanumeric characters (0-9, A-Z) to represent numbers compactly. It's used in URL shorteners, unique ID generation, and data encoding.
Q Why are bases 2, 8, and 16 common in computing?
They are all powers of 2, which aligns with binary digital hardware. This makes conversion between them trivial: group binary bits in sets of 3 (octal) or 4 (hex).
Q Can I convert decimal fractions?
This tool works with integers. Decimal fractions in other bases can involve repeating digits and require different algorithms.

About This Tool

Number Base Converter is a free online tool by FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration or installation required.