Number Base Converter (2 / 8 / 10 / 16 / 36)
ConversionEverything runs locally in your browser — nothing is uploaded
Convert a number between binary, octal, decimal, hexadecimal and base 36, with all five 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 and base 36 results all shown at once
- 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 five 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 result?
- 0x, 0o and 0b are the three prefixes JavaScript itself defines. Base 36 has no standard prefix, and inventing one would produce output that cannot be pasted back into code, so none is added.
- 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
ConversionConvert Unix timestamps into readable dates and back, with seconds and milliseconds told apart, a time zone picker and batch mode. Runs in your browser.
Hash
Encoding & CryptoCompute MD5, SHA-1, SHA-256 or SHA-512 digests of any text, hashed as UTF-8 bytes so they match openssl and sha256sum exactly. Runs in your browser.
Color Converter
ConversionConvert a colour between HEX, RGB, HSL and HSV, and check whether text and background clear the WCAG AA or AAA contrast ratio, all locally.
Date Calculator
ConversionCount 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
ConversionExplain a cron expression field by field and list its next run times, saying plainly when a schedule can never fire. Runs entirely in your browser.
Unit Converter
ConversionConvert between units of length, weight, temperature, volume and more, seeing one value in every unit of its category at once, all in your browser.