Number Base Converter (2 / 8 / 10 / 16 / 36 / 64)
ConvertEverything runs locally in your browser — nothing is uploaded
Convert a number between binary, octal, decimal, hexadecimal, base 36 and base 64, with all six results listed at once so you never have to switch dropdowns back and forth. The 0x, 0o and 0b prefixes are detected automatically, and underscores or spaces pasted from code are tolerated. Arithmetic uses BigInt rather than ordinary numbers — past 2^53 a double silently drops the tail digits, so a snowflake ID converts to something that looks right but is not, with no error raised.
Features
- Binary, octal, decimal, hex, base 36 and base 64 results all shown at once
- Base 64 uses the standard Base64 alphabet (0-9 A-Z a-z + /), where upper and lower case are different digits
- Automatic prefix detection: 0x for hex, 0o for octal, 0b for binary
- Exact for integers of any length — 19-digit snowflake IDs come out digit-for-digit
- Reports the bit length and whether the value fits in a signed 64-bit integer
- Underscores and spaces act as digit separators, so pasted literals work as-is
- A prefix that contradicts the selected base is an error, not a silent guess
- Fractions are refused outright — 0.1 is a repeating fraction in binary and has no exact answer
How to use
- Paste a number — a 0x / 0o / 0b prefix is detected automatically
- Pick the input base and the prefix / uppercase options if you need them
- All six bases appear at once
- Click Copy to take the result
FAQ
- Why do large integers need special handling?
- JavaScript numbers are double-precision floats: beyond 2^53 adjacent integers are no longer distinguishable, so 1234567890123456789 quietly becomes 1234567890123456800. That is exactly the size of snowflake IDs and auto-increment keys, so this tool uses BigInt throughout and never touches floating point.
- Why is there no prefix on the base 36 or base 64 result?
- 0x, 0o and 0b are the three prefixes JavaScript itself defines. Neither base 36 nor base 64 has a standard prefix, and inventing one would produce output that cannot be pasted back into code, so none is added.
- Which alphabet does base 64 use?
- It starts with `0-9`, continues with the 26 uppercase letters and then the 26 lowercase ones, and ends with `+` and `/` — the same table Base64 encoding uses, except that here it is a set of digits (the tenth is `A`) rather than a way of packing bytes three at a time. ⚠️ Two things to know: upper and lower case are different digits here (`A` is 10 and `a` is 36), so the uppercase toggle does not apply — forcing one case would change half the place values. And `+` and `/` need escaping before they go in a URL or filename; for that, use Base64URL or just base 36.
- Can it convert fractions?
- No, and that is deliberate: 0.1 in decimal is a repeating fraction in binary, so any finite output would be an approximation. Practically every real conversion involves integers, so only integers are supported and fractions are rejected with an explanation.
- What does "needs unsigned 64-bit" mean?
- The value is above 2^63-1 and no longer fits a signed 64-bit integer. Databases distinguish signed and unsigned BIGINT columns, so check the column type before inserting or the value will overflow or be truncated.
Related tools
Timestamp Converter
ConvertConvert Unix timestamps into dates and back, telling seconds, milliseconds, microseconds and nanoseconds apart, with Windows FILETIME and decimals.
Hash
EncodingCompute MD5, SHA-1, SHA-256, SHA-512 or MD4 digests of any text, hashed as UTF-8 bytes so they match openssl exactly. Runs in your browser.
Color Converter
ConvertConvert between HEX, RGB, HSL, HWB, CMYK, Lab and OKLCH, with colour temperature, inverse, complement, nearest ANSI colour and WCAG contrast.
Date Calculator
ConvertCount the days, weeks or months between two dates, or shift a date by any of those. Dates can be picked from a calendar or pasted in — nothing is uploaded.
Cron Parser
ConvertExplain a cron expression field by field and list the next and previous run times, saying plainly when a schedule can never fire.
CSS Units
ConvertConvert a CSS length between px, rem, em, vw, vh and more. Root font size and viewport are adjustable, and each row says what it assumed.