Overview
Introduction
Hexadecimal is just one of infinitely many positional number bases; sometimes you need to see the same value in binary, octal, base-36, or something in between.
This tool takes a hex number and re-renders it in whatever base from 2 to 36 you pick, entirely client-side.
What Is Hex to Arbitrary Base Converter?
A general-purpose base converter specialized for hex input: it parses your hexadecimal number and outputs its exact value in any target base from 2 through 36.
Rather than offering a fixed dropdown of "common" bases like binary, octal, and decimal, it accepts any integer base in that full range, covering unusual bases you might need for esoteric encodings or puzzles.
How Hex to Arbitrary Base Converter Works
The hex input is validated and parsed into a BigInt using this category's shared hex parser (case-insensitive digits, optional 0x prefix, optional sign).
JavaScript's native `BigInt.prototype.toString(radix)` then renders that exact integer value in the chosen base, and the result is uppercased for any alphabetic digits.
When To Use Hex to Arbitrary Base Converter
Use it whenever you need a hex value expressed in a base other than the usual binary/octal/decimal trio, base-36 for compact URL-safe identifiers, base-32 for certain encoding schemes, or any other base a specific format calls for.
It also works fine for the common cases (base 2, 8, 10) if you'd rather not switch to a dedicated single-purpose converter.
Often used alongside Hex to Number Converter, Number to Hex Converter and Hex to Unary Converter.
Features
Advantages
- Supports the full valid range of positional bases (2 to 36), not just a handful of preset options.
- Exact for arbitrarily large hex values thanks to BigInt arithmetic.
- Handles negative hex input by preserving the sign in the output base.
Limitations
- Bases above 36 aren't supported, since there's no standard single-character digit set beyond 0-9 and A-Z.
- The output uses only uppercase letters as extra digits; there's no option for a custom digit alphabet.
Examples
Best Practices & Notes
Best Practices
- Double check the chosen base is actually what your target format expects; base-32 and base-36 both look similar but produce very different digit strings.
- For a fixed, well-known base like binary or octal, a dedicated converter may be marginally clearer, but this tool produces identical results.
Developer Notes
Implemented with `BigInt.prototype.toString(radix)`, which natively supports radices 2 through 36 and already lowercases letters, so the final step is a simple `.toUpperCase()` on the result to match this category's output convention.
Hex to Arbitrary Base Converter Use Cases
- Converting a hex identifier into a compact base-36 short code
- Exploring a value across several unusual number bases at once
- Checking a hex value's binary or octal form without a separate tool
Common Mistakes
- Entering a base outside the 2-36 range and expecting it to work; there's no valid single-character digit set beyond that range.
- Forgetting that letters in the output represent digit values, not literal alphabetic characters (e.g. "Q" above means 26, not the letter itself).
Tips
- For base 16, the output will simply match your (uppercased) input, useful as a quick sanity check that the parser read your value correctly.
- Use Hex to Number Converter instead if you specifically want decimal (base 10) and don't need any other base.