What it does
Converts numbers between any two bases from 2 to 36 — not just the common ones like binary, octal, decimal, and hexadecimal, but any custom radix in between (base 3, base 7, base 20, base 36...). It also includes a Text mode that converts each character of a string to/from its numeric code point in the chosen base, which is handy for building simple encodings or understanding how text maps to numbers.
Try it
How it works
Number ↔ Number mode
- The input is parsed as an integer in the "From base" you selected, using JavaScript's arbitrary-precision
BigIntso even very large numbers (larger thanNumber.MAX_SAFE_INTEGER) convert correctly. - That value is then re-encoded as a string of digits in the "To base", using the digits
0-9thena-zfor bases up to 36 (so base 16 uses0-9a-f, base 36 uses every letter and digit). - Leading/trailing whitespace and underscores (sometimes used as digit separators, e.g.
1010_1100) are stripped before parsing.
Text ↔ Numbers mode
- Text → Numbers: each character's Unicode code point is converted to the target base and the results are shown space-separated (e.g.
"Hi"→72 105in decimal, or48 69in hexadecimal). - Numbers → Text: a space-separated list of numbers in the "From base" is parsed and each value is converted back to its character via
String.fromCharCode.
Supported bases
Any integer base from 2 (binary) to 36 is supported, including the common presets:
| Base | Name | Digits used |
|---|---|---|
| 2 | Binary | 0-1 |
| 8 | Octal | 0-7 |
| 10 | Decimal | 0-9 |
| 16 | Hexadecimal | 0-9a-f |
| 32 | Base32 | 0-9a-v |
| 36 | Base36 | 0-9a-z |
Notes
- This is a pure numeric radix converter, not the
Base64encoding scheme (which encodes raw bytes, not integers, using a different alphabet including+and/). For that, see the dedicated Base64 Encoder / Decoder tool. - Negative numbers are supported in Number mode (prefix with
-). - Everything runs entirely in your browser — nothing is sent anywhere.