Number Base Converter
ConvertersConvert numbers between binary, octal, decimal, hexadecimal, and any base from 2 to 36 with clear step-by-step output.. Free, private — all processing in your browser.
The Number Base Converter transforms numeric values between any two positional numeral systems from base 2 through base 36, instantly and with the working shown. Programmers, electrical engineers, students, cryptographers, and embedded developers deal with multiple bases every day: binary (base 2) for raw bits and flags, octal (base 8) for Unix file permissions, decimal (base 10) for everyday math, and hexadecimal (base 16) for memory addresses, color codes, MAC addresses, hashes, and compact representations of bytes. Occasionally you also need base 32 or base 36 for short identifiers and custom encodings.
This tool converts in both directions simultaneously. Type a value in one base, watch every other common base update in real time. Toggle bit-level breakdown to see how each digit of a hex number maps to four binary bits, or how 755 in octal decomposes into the rwxr-xr-x permission bits. The converter also enforces validity — if you paste a hex string with a stray G character, the exact position of the error is highlighted. Fractional values are supported, so 0.5 decimal becomes 0.1 binary and 0.8 hexadecimal, with configurable precision for repeating expansions.
Number Base Converter — key features
All common bases at once
Binary, octal, decimal, hexadecimal, and base 36 update simultaneously as you type in any field.
Any base from 2 to 36
Pick any source and target base in the 2-36 range to handle specialized numeric systems or educational exercises.
Step-by-step working
Toggle the breakdown panel to see the exact division-and-remainder steps used to convert — useful for students and teachers.
Bit-level inspection
View binary, hex, and octal digit groupings aligned so you can see which bits map to which hex or octal digits.
BigInt precision
Arbitrary-precision arithmetic means cryptographic 1024-bit numbers convert exactly with no rounding errors.
Fractional number support
Convert decimals like 3.14159 to binary or hex with configurable precision and a warning when the expansion does not terminate.
Validation with error position
Invalid digits for the source base are highlighted at their exact character position so you can fix typos quickly.
Shareable URL
Every conversion produces a URL you can bookmark or paste into chat to show the exact input and result.
How to use the Number Base Converter
- 1
Enter a number in any base
Type or paste your value into the field labeled with the source base. Case does not matter for hex or base 36 letters.
- 2
Watch other bases update
Binary, octal, decimal, hex, and base 36 fields recalculate instantly as you type, so you can read the equivalent value in every common system.
- 3
Optional — pick a custom base
If you need a base outside the common five (say base 12 or base 20), enter the target base in the custom field.
- 4
Toggle working
Turn on the step-by-step panel to see the division-and-remainder or multiplication process behind the conversion.
- 5
Copy or share
Copy any field value to the clipboard with one click, or share the URL so a colleague sees the exact same inputs and results.
Common use cases for the Number Base Converter
Programming and debugging
- →Memory address inspection: Convert hex addresses from stack traces or crash dumps to decimal to compare with array offsets or pointer arithmetic.
- →Bitmask flag decoding: Break a decimal flag value into binary to see which individual bits are set, useful for HTTP status semantics or protocol headers.
- →Color code manipulation: Convert between hex color codes (#FF6B35) and RGB decimal values (255, 107, 53) when working across different design tools.
Systems and Unix
- →File permission math: Convert between octal chmod values (755) and the binary permission triads (rwxr-xr-x) they represent.
- →Networking and subnets: Check binary representations of IP masks like 255.255.255.0 to confirm prefix length /24 matches your intent.
- →Embedded register programming: Translate datasheet hex register values into binary to verify individual bit settings before writing to hardware.
Education and study
- →Computer science homework: Get step-by-step working for base conversion questions so you can verify your hand calculation and find errors.
- →Discrete math exercises: Explore how different bases represent the same quantity, useful for understanding positional notation deeply.
- →Teaching aid: Show students in real time how incrementing a decimal value affects the binary and hex representations.
Number Base Converter — examples
Decimal 255 in all bases
The maximum value of one byte, shown in every common base.
255 (decimal)
binary: 11111111 octal: 377 hex: FF base 36: 73
Hex to decimal
Converting a CSS color channel to decimal for RGB calculations.
FF6B35 (hex)
decimal: 16738613 binary: 1111 1111 0110 1011 0011 0101 red: 255, green: 107, blue: 53
Octal Unix permissions
Converting chmod 755 into its binary permission bits.
755 (octal)
binary: 111 101 101 meaning: rwx r-x r-x (owner, group, others)
Large cryptographic value
A 256-bit hex value converted to decimal exactly using BigInt.
0x2A7B4F8E1C9D6B3A (hex, 64-bit)
decimal: 3061194175486451002 binary: 64 bits with no precision loss
Fractional decimal
Converting 0.1 decimal to binary shows why floating-point arithmetic is imprecise.
0.1 (decimal)
binary: 0.00011001100110011... (repeating) marked as approximate due to infinite expansion
Technical details
Positional numeral systems assign each digit a value equal to the digit itself multiplied by the base raised to the power of its position from the right. For an integer d_n d_(n-1) ... d_1 d_0 in base b, the decimal value is the sum of d_i times b^i for i from 0 to n. Converting to another base is the reverse: repeatedly divide the decimal value by the target base and read remainders from bottom to top.
This tool uses arbitrary-precision arithmetic (BigInt under the hood) so conversion works for numbers of any size — even 1024-bit cryptographic values. Standard JavaScript numbers would lose precision above 2^53, but BigInt keeps every bit exact. For integer conversion, the algorithm is O(n log b) where n is the digit count, which is effectively instant for any number you will paste into a browser.
Base 36 (digits 0-9 and a-z) is the largest base supported by convention because after 36 you run out of readable alphanumeric symbols without introducing case sensitivity or custom alphabets. Base 62 (0-9, A-Z, a-z case sensitive) and base 64 (standard MIME alphabet) exist but live outside classic number base tools — they belong to encoding tools for byte-oriented data.
Fractional conversion is trickier. The decimal 0.1 has no exact finite representation in binary (it is a repeating fraction, like 1/3 in decimal). The converter truncates or rounds to a configurable precision and marks the result as approximate when the expansion does not terminate. This matches how floating-point hardware represents the same values — useful for understanding why 0.1 + 0.2 ≠ 0.3 exactly in most programming languages.
Common problems and solutions
⚠Hex prefix causes parse error
Some tools require 0x, 0b, or # prefixes and some reject them. This converter accepts both — paste FF or 0xFF and you get the same result — but when you copy the output, check whether the downstream consumer wants a prefix.
⚠Leading zeros silently stripped
The number 00042 and 42 in any base are the same mathematically, so leading zeros are normalized away. If the leading zeros matter for display (fixed-width field), pad the output after copying.
⚠Case confusion in hex and base 36
Hex accepts 0-9 A-F or 0-9 a-f. Base 36 adds A-Z uppercase only by convention. Mixing cases in your input works, but fixed-case consistency helps when comparing values visually.
⚠Fractional binary never terminates
0.1 decimal is an infinite repeating fraction in binary. The output shows a truncated version with a clear warning. Use rational or decimal arithmetic in code, not float, when exact values matter.
⚠Bases above 36 are not standard
This tool stops at base 36 because alphanumeric digits 0-9A-Z run out at 36 values. For base 58 or base 64 encoding, use the dedicated encoder tools — they are not number bases, they are byte encodings.
⚠Negative numbers need context
Conversions show the magnitude with a leading minus sign. Two’s complement representation (for signed integers in hardware) is a different problem — you need to know the bit width (8, 16, 32, 64) to produce the correct pattern.
⚠Copy-paste adds whitespace
Trailing spaces or line breaks in pasted input can cause parse errors. The converter trims whitespace automatically, but verify the output matches expectation after pasting from other tools.
Number Base Converter — comparisons and alternatives
Compared to a physical scientific calculator with a DEC/BIN/HEX/OCT mode, this browser tool shows every base simultaneously — you do not press a mode button and lose sight of the other representations. For teaching, debugging, and everyday conversion work, the all-at-once layout is faster and clearer.
Compared to Python parseInt or JavaScript Number.toString(radix), this tool does not require you to write code or worry about integer overflow. BigInt-backed arithmetic handles any size, and the step-by-step view is friendlier for learning how positional notation really works.
Compared to the Windows Calculator in programmer mode, this tool runs on any device in any browser. The programmer mode in Windows is good for quick bitwise operations (AND, OR, XOR, NOT, shifts) which this tool does not cover — for those, pair this converter with a dedicated bitwise operations tool.
Frequently asked questions about the Number Base Converter
▶What is the largest number I can convert?
There is no practical upper limit. The converter uses JavaScript BigInt, which handles arbitrary-precision integers. Even 4096-bit RSA modulus values convert accurately with no rounding.
▶How do I convert decimal fractions like 0.1 to binary?
Enter 0.1 in the decimal field and the binary field shows the repeating expansion 0.0001100110011... with a note that it does not terminate. Adjust the precision setting to get more or fewer fraction digits in the output.
▶Does the converter support negative numbers?
Yes. Enter -42 and all bases show the magnitude with a leading minus sign. For two’s complement hardware representation (where negative integers use bit patterns like 11111110 for -2 in an 8-bit byte), consult a dedicated two’s complement calculator — that needs a fixed bit width you specify.
▶Can I convert between arbitrary bases, not just the common ones?
Yes. Any base from 2 (binary) to 36 (alphanumeric) is supported. Set the custom base field and both source and target can be any value in that range.
▶What about base 58, base 62, or base 64?
Those are byte-oriented encodings with custom alphabets, not pure number bases in the positional sense. They live in dedicated encoding tools because the alphabet and padding rules vary between implementations. Search for base58, base62, or base64 tools for those conversions.
▶Why does the bit-level view show groups of four?
Each hexadecimal digit represents exactly four binary bits (2^4 = 16), so grouping binary digits in fours makes the correspondence with hex visually obvious. Octal uses groups of three because 2^3 = 8.
▶Is there a URL I can bookmark with a specific conversion?
Yes. Every conversion updates the URL hash with the input value and base. Bookmark or share the URL to come back to the exact same conversion later.
▶Does this run without internet?
After the page loads once, the conversion logic works fully offline because everything runs client-side. No server round trips for any conversion.
Additional resources
- Wikipedia — Positional notation — Comprehensive background on how positional numeral systems work and convert.
- MDN — Number.prototype.toString — JavaScript API for base conversion, supporting radix 2 through 36.
- Python int() documentation — Python built-in for parsing integers with an explicit base, supporting the same 2-36 range.
- IEEE 754 floating point — The standard behind why 0.1 decimal does not terminate in binary and why floating-point math has rounding.
- Linux chmod documentation — Explains how octal values map to Unix file permission bits — a common real-world base conversion task.
Related tools
All ConvertersBinary to Text Converter
Convert binary code (0s and 1s) to readable text in ASCII or Unicode, with configurable grouping and separator options.
Byte Converter
Convert digital storage units between bytes, KB, MB, GB, TB, PB with support for both binary (base-1024) and decimal (base-1000) conventions.
Chmod Calculator
Calculate Unix file permissions — convert between symbolic and octal notation
Color Converter
Convert between HEX, RGB, HSL, HSV, CMYK, Lab, LCH color formats
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-512 hashes for text and files
Hex to Text Converter
Convert hexadecimal byte sequences to readable ASCII or UTF-8 text with flexible input formatting.
Learn more
Explore more tools
200+ free tools that run in your browser.
Browse all tools →