What is a base converter?
A base converter — also called a radix converter, number base calculator, or numeral system converter — translates a number written in one positional numeral system into the same number written in another. The value never changes; only the symbols used to represent it do. The decimal number 255 becomes FF in hexadecimal and 11111111 in binary, but all three strings describe exactly the same quantity.
Number bases matter because different parts of computing and mathematics prefer different radixes. Humans use base 10 because we have ten fingers. Computers use base 2 because transistors have two stable states. Programmers use base 16 because it is a compact way to write binary — one hex digit maps exactly to four binary digits. Unix uses base 8 because file permissions are naturally grouped in threes. URL shorteners use base 36 (0-9 + A-Z) because it packs the most information per character while still being typable from a standard keyboard.
Understanding bases is not just academic. Every time you debug memory, look at a colour code, read a permission mask, or decode a URL shortener's ID, you are working with numbers in a non-decimal base. Being able to convert fluently — and more importantly, to see what a value means in binary — is one of the most useful skills in software development.
Positional notation — the single idea behind every base
Every positional numeral system works the same way: each digit's value depends on its position. A digit at position i (counting from 0 on the right) is multiplied by the base raised to the power of i, and all of those contributions are added together. Nothing else changes between bases — only the alphabet of allowed digits and the weight of each position.
In decimal, 3,742 means:
= 3 × 1000 + 7 × 100 + 4 × 10 + 2 × 1
= 3,742
In binary, the same pattern applies with base 2. The number 1101 means:
= 1 × 8 + 1 × 4 + 0 × 2 + 1 × 1
= 13
Once you internalise this one idea, every conversion becomes mechanical. The tool's Place Values panel does exactly this calculation for you, showing every digit, its weight, and its contribution to the total.
How to use this base converter
- Enter a value. Type a number into the input field. Prefixes like
0x,0b, and0oare auto-detected and the base dropdown adjusts automatically. Underscores used as digit separators (like0b1010_1010) are stripped. - Pick the input base. Use the dropdown on the right of the input. Common bases are at the top; less common ones (3–7, 9, 11–15, 20, 24–28, 30, 60) are below.
- Watch the digit strip. Below the input, a strip shows each digit as a chip with its decimal value. This is a compact way to verify at a glance that you typed what you meant.
- Read the six result tiles. Each tile shows the number in binary, octal, decimal, hex, base 32, and base 36. Each has a Copy button. The small text below each value shows the digit count.
- Inspect the working. The Place Values panel shows every position's weight and contribution — click any digit column to highlight it. The sum is shown at the bottom.
- Explore the Visualize tab. Click individual bits to toggle them, see the byte-by-byte breakdown with hex/dec/ASCII, look at how your number would be stored as two's complement, and see the exact IEEE 754 bit pattern if you entered a floating-point number.
- Configure display options. Choose uppercase or lowercase letters, digit grouping (nibble, byte, or word), and whether to add language prefixes (0b, 0o, 0x).
- Copy, share, or export. Copy a single base's value, copy all bases as text, copy as CSV for a spreadsheet, or generate a shareable URL that encodes every setting.
The bases you will actually use
Binary (base 2) — the language of hardware
Binary uses only two digits: 0 and 1. Every modern computer is fundamentally binary because the electronic components inside (transistors) have two stable states — on and off. A single binary digit is called a bit, and eight bits make up a byte, which can represent 256 distinct values (0 through 255).
Binary is verbose — 255 in decimal is 11111111 in binary. This verbosity is why programmers rarely write binary by hand and instead use hex or octal as compact shorthand.
Octal (base 8) — the Unix permissions system
Octal uses digits 0 through 7. Because 8 = 2³, three binary digits map exactly to one octal digit. Octal was popular on early mainframes because it was an efficient way to write 6-bit and 12-bit words.
Its most famous use today is Unix file permissions. The permission field is 12 bits, divided into three permission groups (read, write, execute) for three user categories (owner, group, other). Each group of 3 bits maps to one octal digit, so chmod 755 means the owner gets rwx (7 = 111), and everyone else gets r-x (5 = 101). This is why octal refuses to disappear — it is genuinely the clearest way to read file permissions.
Decimal (base 10) — everyday numbers
Decimal uses digits 0 through 9. It is what most people mean by "a number" and is the default input base in this tool. Everything the user interacts with in normal life — money, measurements, ages, prices — is decimal.
Hexadecimal (base 16) — the programmer's shorthand
Hex uses digits 0-9 plus A-F (where A=10, B=11, ..., F=15). Because 16 = 2⁴, one hex digit maps exactly to four binary digits (a nibble). Two hex digits make one byte.
Hex is everywhere in computing: memory addresses are usually written in hex (like 0x7FFE0000), web colours are hex triplets (#FF0000 for pure red), byte dumps from debuggers show hex, and every low-level language lets you write numeric literals in hex. Learning to read hex at a glance is one of the most useful skills in systems programming.
Base 32 — hash and token encoding
Base 32 uses 32 symbols. In its strict positional form it uses 0-9 followed by A-V, but the widely-used RFC 4648 Base32 encoding uses a different alphabet (A-Z and 2-7, deliberately omitting 0, 1, 8, 9 to avoid ambiguity when typed by humans). Base32 is used for TOTP secrets in two-factor authentication, some cryptographic key formats, and any application where case-insensitive encoding matters.
Be careful not to confuse the two: this tool's base 32 tile shows the number in positional base 32 (mathematical radix), while RFC 4648 Base32 is a byte-level encoding used to represent binary data as text. They share a name but solve different problems.
Base 36 — short, human-readable IDs
Base 36 uses 0-9 plus A-Z, making it the largest standard base that uses only letters and digits. It is popular for URL shorteners (bit.ly, TinyURL), database ID encoding (Reddit post IDs and YouTube video IDs are variants of base-64-style encoding on top of the same idea), and any application that needs short, case-insensitive, typeable identifiers.
Each base-36 digit carries about log₂(36) ≈ 5.17 bits of information, compared to 3.32 bits for each base-10 digit. So the same numeric ID needs roughly 36% fewer characters in base 36 than in decimal.
How the conversion algorithms work
Integer conversion from decimal to any base — repeated division
Divide the number by the target base, record the remainder (this is the next digit from right to left), replace the number with the integer quotient, and repeat until the quotient is 0. Read the remainders in reverse order. Example: convert 255 to hex.
15 ÷ 16 = 0 remainder 15 → digit F
Read in reverse: FF
Any base to decimal — positional sum
Multiply each digit by the base raised to its position, then sum. The interactive Place Values panel does this step by step — every position shows the power, the digit, and the product, and the sum appears at the bottom.
Fractional numbers
Digits to the right of the radix point work with negative powers. In binary, the positions after the point are worth 1/2, 1/4, 1/8, and so on. The decimal value 10.5 in binary is 1010.1 because 1/2 = 0.5.
Converting fractions to another base uses a different algorithm: repeatedly multiply the fraction by the target base and take the integer part each time. This is the inverse of the integer algorithm.
⚠ A gotcha with fractions. Not every fraction that terminates in one base terminates in another. Decimal 0.1 is a clean 1/10, but in binary it becomes 0.0001100110011… repeating forever. This is why the tool limits fractional output to 32 digits — long enough for practical work, but honest about the fact that some fractions never close.
Bitwise operations explained
Bitwise operations treat numbers as sequences of bits and apply logical operations to each bit position independently. They are the foundation of low-level programming, encryption, compression, and hardware control.
AND (&) — masking and testing
A bit in the result is 1 only if both corresponding input bits are 1. AND is used to test or extract specific bits: x & 0x0F keeps only the low nibble of x. To test whether bit 3 is set, compute (x & 8) != 0.
OR (|) — setting bits
A bit in the result is 1 if either input bit is 1. OR is used to set specific bits without affecting others: x | 0x80 sets the top bit of an 8-bit value regardless of what was there before.
XOR (^) — toggling and encryption
A bit in the result is 1 if the two input bits differ. XOR is used to toggle bits and has a magical property: XORing the same value twice returns the original. This is the base of many simple encryption schemes, checksums, RAID parity, and is the reason the classic one-liner a ^= b; b ^= a; a ^= b; swaps two variables without a temporary.
NOT (~) — bitwise inversion
Flips every bit of a single input. In a fixed-width integer, ~x is equivalent to -x - 1 because of two's complement representation. The tool shows NOT in the current bit width (8/16/32/64) so you can see the exact result.
Shift left (<<) and shift right (>>)
Shifting left by n bits multiplies the value by 2ⁿ. Shifting right by n bits divides by 2ⁿ (integer division). Shifts are much faster than multiplication and division on most CPUs, which is why compilers often translate x * 8 to x << 3. The tool performs logical shifts (zeros fill the empty positions), which is what most programming languages use for unsigned values.
Two's complement and negative numbers
Computers represent negative integers using two's complement. The idea is simple: negate a number by flipping all its bits and adding 1.
In 8-bit two's complement:
00000001is +100000000is 011111111is -110000000is -128 (the most negative 8-bit value)01111111is +127 (the most positive 8-bit value)
Every modern CPU uses this scheme because it makes addition and subtraction work identically for signed and unsigned values. The same hardware adder adds +1 and -1 to get 0 without needing a separate "subtract" circuit.
💡 Why this matters when converting bases. If you enter -255 in the tool, it converts the magnitude as a positive number and preserves the minus sign. But in a fixed-width binary representation, -255 in 16-bit two's complement is 1111111100000001 — completely different from the sign-magnitude view 1000000011111111. The Visualize tab has a dedicated panel that shows both representations side by side, so you can see exactly what a CPU would store.
IEEE 754 — how computers store decimal numbers
Integers are easy: just write the bits. But decimal numbers like 3.14 need a different representation. The IEEE 754 standard defines how floating-point numbers are stored as bits, and it is used by virtually every programming language and every CPU made since the 1980s.
A single-precision float (32 bits) is laid out as:
- 1 sign bit — 0 for positive, 1 for negative.
- 8 exponent bits — biased by 127, so an exponent field of 127 means the actual exponent is 0.
- 23 mantissa bits — the fractional part after an implicit leading 1.
A double-precision float (64 bits) uses 1 sign, 11 exponent (biased by 1023), and 52 mantissa bits.
The Visualize tab shows the exact bit layout for your number. This is what you would see if you dumped the raw bytes of a float variable in a debugger — the same bits the CPU actually stores and manipulates. The representation explains oddities like why 0.1 + 0.2 equals 0.30000000000000004 in most languages, and why floating-point arithmetic is never exact for arbitrary decimal values.
Character codes and text conversion
Every character in a text file or web page is stored as a numeric code point. The Text tab in this tool converts between text and those codes.
Common code points to remember:
- Digits '0' to '9' — 48 to 57 (hex 30 to 39). Notice that the low nibble matches the digit itself — this is why
c - '0'gives you the numeric value of an ASCII digit character. - Uppercase 'A' to 'Z' — 65 to 90 (hex 41 to 5A).
- Lowercase 'a' to 'z' — 97 to 122 (hex 61 to 7A). The 32-value gap between upper and lower case is exactly one bit (bit 5). Flipping that bit swaps case — the classic
c ^ 32trick. - Space — code point 32 (hex 20).
- Newline — code point 10 on Unix; 13 followed by 10 on Windows.
- Emoji and non-Latin scripts — code points above U+FFFF, requiring 4 bytes in UTF-8. The grinning face 😀 is U+1F600 = 128,512 decimal.
Practical applications
Debugging memory and binary data
When you look at a hex dump of a memory region, network packet, or file, every two hex digits are one byte. Converting that byte to binary shows exactly which bits are set, and converting to decimal gives you the byte's numeric value. The Visualize tab's bit grid is the fastest way to inspect individual flags.
Writing bit masks for flags
Many APIs pack multiple boolean options into a single integer. Each option is one bit. To set bit 3 without disturbing others, you write flags | 0b00001000. To test it, you write flags & 0b00001000. The bit grid makes it easy to see which bits are set and which are not.
Colour codes in web design
CSS and HTML use hex colour codes: #FF0000 for pure red, #00FF00 for green, #0000FF for blue. Each pair of hex digits is one colour channel with a value 0-255. Converting 255 to hex gives FF, which is why pure colours show FF in one channel and 00 in the other two.
Cryptography and hash algorithms
Cryptographic hashes (SHA-256, MD5, SHA-1) produce byte arrays that are conventionally displayed in hex. A SHA-256 hash is 256 bits = 32 bytes = 64 hex digits. Converting those hex digits to other bases is occasionally useful for analysis or comparison.
Embedded programming
Microcontroller register values are almost always specified in hex in the datasheet because hex maps cleanly to the individual bit fields the hardware exposes. Converting between hex and binary by hand is tedious and error-prone, but the bit grid here makes it instant.
Network protocols
Network packets, IP headers, MAC addresses, and port numbers are typically shown in hex or decimal. A MAC address like 00:1A:2B:3C:4D:5E is 48 bits = six bytes. IPv4 addresses are four bytes, IPv6 groups are 16-bit values. Converting each part between bases is a daily task for network engineers.
Learning how computers work
There is no better way to build intuition for how computers represent numbers than by playing with the bit grid — clicking bits, watching decimal and hex update, and seeing how a single bit flip changes the value by exactly a power of two. This is the intuition that separates programmers who use bitwise operations from those who truly understand them.
A short history of number bases
Number bases are as old as counting. The Babylonians used base 60 around 2000 BCE — which is why an hour has 60 minutes and a circle has 360 degrees. The Maya used base 20 (vigesimal), possibly because they counted on both fingers and toes. The Romans developed a non-positional system using letters (I, V, X, L, C, D, M), which is why Roman numerals are so awkward for arithmetic.
The Hindu-Arabic positional decimal system was formalised by Indian mathematicians around the 5th century CE and spread to Europe through Arab scholars in the 12th century. Its key innovation was the digit 0, which made place value unambiguous.
Binary was studied theoretically by Gottfried Wilhelm Leibniz in 1689, but it only became practical in the 20th century when Claude Shannon's 1937 master's thesis showed that Boolean algebra — based on binary — could design digital circuits. From that point binary became the language of every computer built.
Octal was popular on 1960s mainframes because 6-bit and 12-bit words grouped cleanly into octal. When the industry standardised on 8-bit bytes in the 1970s, hex became the natural shorthand (a byte is exactly two hex digits) and octal retreated to Unix permissions and a few legacy corners.
Base 36 emerged in the early web era as a compact way to encode integer IDs into URLs. It was never formally standardised but became a de facto convention because it uses only keyboard-friendly characters and no punctuation.
Common mistakes and how to avoid them
- Forgetting that hex digits above 9 are letters. The value 12 in decimal is C in hex, not "12". Mixing up decimal digit characters with hex digit characters is the single most common beginner error.
- Confusing base 10 with base 2. The decimal number 10 and the binary number 10 are different values (ten versus two). Always check the base before assuming what a string of digits means.
- Assuming JavaScript's parseInt handles arbitrary size.
parseInt("111111111111111111111111111111111111111", 2)returns a rounded result because parseInt uses 64-bit floating-point. This tool uses BigInt for all conversions and never loses precision. - Writing 08 as octal in JavaScript. In strict mode, JavaScript forbids octal literals that look like leading-zero decimal. Use
0o8or convert withparseInt("8", 8)instead. - Treating fractional output as exact. A fraction that terminates in one base may not terminate in another. The tool shows up to 32 fractional digits — you should be aware that "0.1" in binary is not exactly one tenth.
- Mixing up base 32 (positional) and Base32 (RFC 4648 encoding). These are different things. Positional base 32 uses digits 0-9 and A-V. RFC 4648 Base32 uses a specific alphabet (A-Z then 2-7) to encode bytes as text.
- Assuming leading zeros matter. They don't in arithmetic —
00011111is the same value as11111. In fixed-width contexts like network protocols they often do matter, which is why the bit grid shows the value padded to the selected width. - Reading hex colour codes backwards. #FF0000 is red, not blue, because the three byte pairs are in red-green-blue order, not the reverse.
- Forgetting that negative binary needs a width. "-5 in binary" is meaningless unless you specify 8-bit, 16-bit, or 32-bit two's complement. The tool treats input as sign-magnitude by default and shows the two's complement form separately.
- Using parseInt without specifying the radix.
parseInt("08")used to return 0 in old JavaScript. Always pass the radix explicitly:parseInt("08", 10).
Privacy and data handling
Every calculation on this page runs entirely in your browser using vanilla JavaScript and native BigInt. Nothing you type is uploaded, logged, cached, or transmitted anywhere. There is no account, no login, and no network request after the page loads. The recent-conversions history is stored only in your browser's local storage and can be cleared with one click. If you close the tab, all input values are forgotten.
Limitations
- Integer conversions are exact for any size thanks to BigInt. Fractions are computed to 32 digits past the radix point — more than enough for practical work, but not infinite precision.
- The bit grid shows up to 64 bits for readability. Larger numbers still convert correctly in the text output — only the graphical bit grid is width-limited.
- The IEEE 754 viewer shows the standard bit layout but does not simulate the arithmetic of floating-point operations. It reads your decimal as a float32 and float64 and displays the resulting bits — the same as viewing a float in a debugger.
- Base 60 is included as a curiosity — the tool uses the standard 0-9 A-Z digit alphabet, so values above digit 35 are shown as multi-character groups. This matches how Babylonian base 60 was actually written (as grouped symbols), but it is not a general-purpose positional notation.
- Bitwise operations treat inputs as unsigned integers within the selected width. The NOT operation in particular is width-dependent — the tool uses the current grid width (8/16/32/64) when computing NOT.
- Arbitrary-precision division returns the integer quotient only — the tool does not perform arbitrary-precision floating-point arithmetic. Fractions are handled separately by a decimal-based code path.
- There is no built-in hashing, encryption, or network protocol parsing. This is a pure number-conversion and visualization tool.
Frequently asked questions
What is a base converter?
A base converter (also called a radix converter or numeral system converter) translates a number written in one positional numeral system into the same number written in another. The value never changes — only the symbols used to represent it. For example, decimal 255 is FF in hex and 11111111 in binary.
What bases does this converter support?
Any base from 2 to 36. Binary (2), octal (8), decimal (10), hexadecimal (16), base 32, and base 36 all have dedicated result tiles. Every other base — 3, 4, 5, 6, 7, 9, 11 through 15, 20, 24, 25, 26, 27, 28, 30, and 60 — is available through the custom output base dropdown.
How do I convert binary to decimal?
Multiply each binary digit by its place value (a power of 2) and add them. For example, 1101 in binary = 1×8 + 1×4 + 0×2 + 1×1 = 13 in decimal. This tool does the calculation instantly and shows the working in the Place Values panel.
How do I convert decimal to hexadecimal?
Repeatedly divide the decimal number by 16 and record each remainder. Read the remainders in reverse order. Example: 255 ÷ 16 = 15 remainder 15; 15 ÷ 16 = 0 remainder 15. Reading 15 and 15 as hex digits gives FF.
Does this converter support very large numbers?
Yes. All integer conversions use JavaScript's native BigInt type, which has no theoretical size limit beyond available memory. Numbers with hundreds or thousands of digits convert with exact precision — no rounding, no floating-point errors.
Does this converter support fractional numbers?
Yes. You can enter 10.5 in decimal and see it as 1010.1 in binary, 12.4 in octal, and A.8 in hex. Fractional digits are computed to 32 places past the radix point. Note that some fractions terminate in one base but repeat in another — decimal 0.1 becomes 0.0001100110011… in binary.
What is the digit alphabet for bases above 10?
Digits 10–35 use the letters A–Z (case-insensitive). Base 16 uses 0-9 and A-F. Base 36 uses 0-9 and A-Z. This follows the convention used by RFC 4648, JavaScript's parseInt, and almost every programming language.
Can I use negative numbers?
Yes. Prefix the number with a minus sign. The sign is preserved across conversions. The Visualize tab also includes a two's complement visualizer that shows how negative numbers are stored in fixed-width binary using the same scheme every modern CPU uses.
What bitwise operations does the tool support?
Six standard operations: AND, OR, XOR, NOT, left shift (SHL), and right shift (SHR). Enter two numbers in any base, pick an operation, and the result is shown in every common base simultaneously. The Bitwise tab also draws the two input numbers' bits aligned above the result so you can see the operation bit-by-bit.
What is the interactive bit grid?
The bit grid is a clickable table showing every bit of your number padded to a fixed width (8, 16, 32, or 64 bits). Click any bit to toggle it between 0 and 1 — the number updates instantly. Bits are grouped into nibbles and bytes with hex labels underneath so you can see how the value maps to memory.
Can I convert text to character codes and back?
Yes. The Text tab converts any string to its Unicode code points in any base, and converts a space-separated list of numbers back to text. It handles emoji (astral plane code points above U+FFFF) correctly by iterating over code points rather than UTF-16 units.
What is the difference between hexadecimal and decimal?
Decimal (base 10) uses digits 0-9. Hexadecimal (base 16) uses 0-9 plus A-F. Hex is popular in programming because each hex digit maps to exactly 4 binary bits, so a byte is exactly two hex digits. This makes hex a compact, readable way to write binary data.
Why is octal used in Unix permissions?
Unix file permissions are stored as a set of bits — one each for read, write, and execute, for three user categories (owner, group, other). Grouping these into 3-bit chunks maps cleanly to octal digits, so chmod 755 means rwxr-xr-x. Octal is genuinely the clearest notation for this bit layout.
What is base 36 used for?
Base 36 uses 0-9 and A-Z, making it the largest base that fits in only letters and digits. It is used by URL shorteners (bit.ly IDs), database ID encoding (Reddit post IDs, YouTube video IDs), and any application that wants short, case-insensitive, keyboard-friendly identifiers.
What is base 32 and where is it used?
There are two different meanings. Positional base 32 uses 32 digit symbols (0-9 then A-V), which is what this converter's base 32 tile shows. RFC 4648 Base32 is a byte encoding with a specific alphabet (A-Z then 2-7, avoiding ambiguous characters) used for TOTP secrets and cryptographic tokens. They are different concepts that share a name.
What is the difference between a base conversion and a base encoding?
A base conversion treats the input as a number and returns the same number in a different base. A base encoding (Base64, Base32, Base58) treats the input as raw bytes and maps them to text characters for transport. Converting 255 from decimal to hex gives FF (a number). Base64-encoding the byte 0xFF gives /w== (text). Both are useful; they solve different problems.
What is two's complement?
Two's complement is the standard way to represent signed integers in binary. To negate a number, invert all its bits and add 1. In 8-bit two's complement, -1 is 11111111 and -128 is 10000000. Every modern CPU uses this scheme because it makes addition and subtraction work identically for signed and unsigned values — the same hardware circuit handles both.
How does the IEEE 754 float visualizer work?
The IEEE 754 standard defines how floating-point numbers are stored as bits. For 32-bit floats: 1 sign bit, 8 exponent bits (biased by 127), and 23 mantissa bits. For 64-bit doubles: 1 sign bit, 11 exponent bits (biased by 1023), and 52 mantissa bits. The tool's Visualize tab takes any decimal number and shows exactly what bits the CPU would store, including edge cases like NaN, infinity, and subnormals.
What is the maximum number this tool supports?
For integers there is no practical limit — BigInt can hold numbers with thousands of digits, limited only by browser memory. Fractions are computed to 32 digits past the radix point. Extremely long inputs (tens of thousands of digits) will run slower because BigInt arithmetic is not as fast as native integer math.
Does this tool handle prefixes like 0x and 0b?
Yes. The parser recognises 0x (hex), 0b (binary), 0o (octal), and 0d (decimal) prefixes and automatically sets the correct input base. It also strips underscores used as digit separators (0b1010_1010 parses as 0b10101010).
What is the difference between BigInt and Number in JavaScript?
JavaScript's Number type is a 64-bit floating-point double that can only represent integers exactly up to 2⁵³-1 (about 9 quadrillion). BigInt is a separate arbitrary-precision integer type. This tool uses BigInt for all integer arithmetic, so it never loses precision — even for numbers with hundreds of digits.
How do I convert between binary and hexadecimal quickly?
Because 16 = 2⁴, one hex digit equals exactly four binary digits. Group the binary number into chunks of 4 bits from the right and translate each chunk: 0000=0, 0101=5, 1010=A, 1111=F. For example, 11010110 → 1101 0110 → D6 in hex.
What is little-endian vs big-endian byte order?
These describe the order in which multi-byte values are stored in memory. Big-endian stores the most significant byte first, matching how numbers are written. Little-endian stores the least significant byte first. x86 and modern ARM CPUs are little-endian; network protocols and Java's DataOutputStream use big-endian.
Can I use this converter for IPv4 or IPv6 addresses?
Yes, per-part. An IPv4 address like 192.168.1.1 is four bytes. Convert each octet separately to hex: 192=C0, 168=A8, 1=01, 1=01, giving C0A80101. IPv6 groups are 16-bit hex values, so each group converts directly. A dedicated IP address converter handles the multi-part logic, but this tool converts each part accurately.
What is the ASCII code for the letter A?
Uppercase A is 65 decimal, 41 hex, or 01000001 binary. Lowercase a is 97 decimal, 61 hex, or 01100001 binary. The 32-value gap between them is exactly one bit (bit 5). Flipping that bit swaps case — the classic c ^ 32 trick used in old assembly code.
What is a bit mask?
A bit mask is a number used with bitwise AND, OR, or XOR to inspect or modify specific bits. x & 0x0F extracts the low nibble of x; x | 0x80 sets the top bit of an 8-bit value. Bit masks are common in graphics programming, network protocol parsing, hardware register access, and any code that packs multiple boolean flags into a single integer.
Does the tool work offline?
Yes. After the page has loaded once, everything runs in your browser using vanilla JavaScript and native BigInt. No network requests are made during normal operation. The only exception is that copying a share link uses the system clipboard API, which works offline.
Does this tool save or upload my numbers?
No. Every calculation happens entirely on your device. Nothing you type is uploaded, logged, cached, or transmitted anywhere. There is no account, no login. The recent-conversions history is stored only in your browser's local storage and can be cleared with one click.
Why does my hex value show as uppercase?
The tool supports both cases. Uppercase is the convention for memory dumps, colour codes, and most programming languages. Lowercase is common in URLs and CSS. Toggle the case in the settings panel and every output updates instantly.
How does the converter handle leading zeros?
Leading zeros are stripped from integer output by default because they carry no numeric value. The bit grid, however, shows the value padded to the selected width (8, 16, 32, or 64 bits) so you can see all bits including the leading zeros — which is what you need when inspecting binary data at a fixed width.
What is the largest base this tool supports?
36. This is the maximum for the standard 0-9 plus A-Z digit alphabet used by parseInt and most programming languages. Bases above 36 exist in special contexts (base 58 and base 62 use extra punctuation characters) but they are encoded alphabets, not standard positional number systems.
What does the prefix option do?
The prefix option adds the standard language prefix to the output: 0b for binary, 0o for octal, 0x for hex. Programming languages use these prefixes to disambiguate literals — without them, the string 10 could mean decimal ten, binary two, or hex sixteen, depending on context.
What is the difference between base and radix?
They are the same thing. Radix is the formal mathematical term for what is commonly called the base in programming contexts. Both refer to the number of unique digit symbols a positional numeral system uses.
How accurate is the fractional conversion?
Fractional results are computed to 32 digits past the radix point in the target base. This is more than enough for engineering and scientific work. Long fractions that do not terminate are truncated at 32 digits with the trailing digits being correct up to that point.
Can I convert very long binary numbers (thousands of bits)?
Yes. The BigInt-based conversion handles binary strings of thousands of bits correctly. The visual bit grid caps at 64 bits for readability — use the raw text output fields for the full value of very long numbers.
What is a nibble and what is a byte?
A nibble is 4 binary bits — exactly one hexadecimal digit. Two nibbles make one byte (8 bits), which is the standard addressable unit of memory in almost every modern computer. A 32-bit value contains 4 bytes; a 64-bit value contains 8 bytes. The bit grid groups bits into nibbles and bytes for easy reading.
What is a word in computing?
A word is the natural unit of data that a CPU processes in one operation. It is 16, 32, or 64 bits depending on the architecture. Modern desktop CPUs use 64-bit words; older ones used 32-bit; early home computers like the Commodore 64 used 8-bit words. Word size determines how much memory the CPU can address and how large single instructions can be.
Can I share a specific conversion with someone?
Yes. The Share button encodes the current input value, base, custom base, case setting, prefix setting, and digit grouping into the URL. Anyone opening that URL sees exactly the same conversion with the same settings.
What happens if I enter a digit that is invalid for the chosen base?
The tool detects invalid digits and shows an inline error message that names the offending character and the base. For example, entering 12 in binary fails because 2 is not a valid binary digit. The error appears immediately below the input field and the result tiles show dashes until the input becomes valid.
Can I use this converter in a spreadsheet?
Indirectly. Use the CSV export button to copy all base outputs in comma-separated format, then paste into Excel, Google Sheets, or Numbers. Each base becomes its own column with a header. For a single value you can also click any result tile's Copy button and paste the number directly into a cell.
Related tools on AIToolsPros
Sources and methodology
- ECMAScript Language Specification — BigInt objects: definition of BigInt and its arbitrary-precision arithmetic semantics.
- RFC 4648 — The Base16, Base32, and Base64 Data Encodings: the standard alphabet used in Base32 encoding (distinct from positional base 32).
- Wikipedia — Positional notation: mathematical foundations of positional numeral systems.
- Wikipedia — Two's complement: the signed integer representation used by virtually every modern CPU.
- Wikipedia — IEEE 754: the floating-point standard used by every modern CPU and programming language.
- Wikipedia — Bitwise operation: reference for AND, OR, XOR, NOT, and shifts with truth tables.
- Linux Kernel documentation — File permissions: octal notation in chmod and the Unix file permission bit layout.
- Unicode Consortium — Code Charts: reference for character code points used in the Text tab.
- MDN — parseInt: reference for the digit convention used by JavaScript's built-in parsers (0-9 then A-Z).