Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal, and any base from 2 to 36 with instant bit visualization.
About This Tool
The Number Base Converter is a free browser-based tool that lets you instantly convert numbers between the most common numeral systems used in programming: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). It also supports any arbitrary base from 2 to 36, covering every standard positional numeral system.
Understanding number bases is fundamental to software development. Binary is the native language of digital hardware and is essential when working with bitwise operations, flags, and low-level protocols. Hexadecimal provides a compact, human-readable representation of binary data and is ubiquitous in memory addresses, color codes, and cryptographic hashes. Octal still appears in Unix file permissions and some legacy systems.
The tool converts all four common bases simultaneously as you type, eliminating the need for multiple lookups or separate conversions. Each output has a dedicated copy button so you can quickly grab the value you need. The bit visualization section displays the binary representation with 8-bit grouping, making it easy to see individual bytes and nibbles at a glance.
For numbers that exceed the range of standard JavaScript numbers, the converter uses BigInt under the hood, ensuring accurate results for arbitrarily large values. All processing runs entirely in your browser — no data is ever sent to a server, making it safe for any input.
How to Use
- Enter the number you want to convert in the Input Value field.
- Select the input base by clicking one of the preset buttons (Binary, Octal, Decimal, Hex) or entering a custom base between 2 and 36.
- The tool instantly displays the converted value in all four common bases: binary, octal, decimal, and hexadecimal.
- Review the Bit Visualization section to see the binary layout with 8-bit grouping.
- Click the copy icon next to any output to copy it to your clipboard, or press Ctrl+Shift+C to copy the decimal value.
About This Tool
FAQ
What is a number base (radix)?
A number base, or radix, is the number of unique digits used to represent values in a positional numeral system. Decimal (base 10) uses digits 0-9, binary (base 2) uses 0 and 1, hexadecimal (base 16) uses 0-9 and A-F, and so on up to base 36 which uses 0-9 and A-Z.
Can I convert very large numbers?
Yes. The converter uses JavaScript's BigInt type internally, which supports integers of arbitrary precision. You can convert numbers with hundreds of digits without losing accuracy.
Does this tool support negative numbers?
Yes. Prefix your input with a minus sign (-) to convert negative numbers. The sign is preserved across all base representations. Note that the bit visualization shows the magnitude only and does not display two's complement.
Why do I get an "invalid digit" error?
Each base only allows certain characters. For example, binary only accepts 0 and 1, octal accepts 0-7, and hexadecimal accepts 0-9 and A-F. Make sure the digits in your input are valid for the selected base.
Is my data sent to a server?
No. All conversions are performed entirely in your browser using JavaScript's built-in parseInt, toString, and BigInt APIs. No data leaves your machine.
Related Tools
Color Converter
Convert colors between HEX, RGB, HSL formats with contrast checker and palette generator.
Timestamp Converter
Convert between Unix timestamps and human-readable dates with timezone support.
Subnet Calculator
Calculate IPv4 subnet details including network address, broadcast, host range, and CIDR notation.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes for text and files.
IP Range to CIDR Converter
Convert start-to-end IP address ranges into minimal CIDR notation blocks. Reverse CIDR to IP range, batch mode, host count display.
CIDR Range Calculator
Calculate CIDR ranges, detect overlaps, check containment, and merge IP blocks. Shows network, broadcast, subnet mask, and host count.
IPv6 Expander / Compressor
Expand and compress IPv6 addresses. Convert between full and shorthand notation with type detection and binary representation.
Network Bandwidth Calculator
Calculate file transfer times based on file size and bandwidth. Compare speeds across 4G, 5G, WiFi 6, Ethernet, and USB connections.
IP Address Analyzer
Analyze IPv4 and IPv6 addresses to see class, type, binary representation, private/public status, and IANA reserved range information.
Semver Calculator
Check semver range matches, compare versions, calculate increments, and batch-test version lists with semantic versioning rules.
Bitwise Calculator
Perform AND, OR, XOR, NOT, and shift operations with visual binary representation and step-by-step breakdowns.
Matrix Calculator
Perform matrix addition, multiplication, transpose, determinant, inverse, row echelon form, and rank calculations with step-by-step solutions.
IEEE 754 Inspector
Inspect IEEE 754 single and double precision floating-point numbers with interactive bit visualization and comparison mode.
Big-O Reference
Interactive Big-O complexity reference with growth charts, algorithm database, and comparison tools. Visualize O(1) to O(n!) growth curves.
Currency Code Reference
Browse and search 150+ ISO 4217 currency codes with symbols, countries, decimal places, and Intl.NumberFormat formatting previews.
Math Expression Evaluator
Evaluate mathematical expressions with support for basic arithmetic, functions, and constants.
Tech Salary Converter
Convert between annual, monthly, biweekly, weekly, daily, and hourly salary rates.