Number Base Converter
Convert integers between bases 2–36 without floating-point rounding. Compare common bases, inspect bit widths and explore signed two’s-complement patterns.
Integer to convert
Integer digits only: 0–9 and A–Z. A leading +/− is allowed; underscores can separate groups. No fractions, exponent notation or spaces inside the number.
For example 0xFF at 8 bits becomes −1 with interpretation enabled. Ordinary negative conversions use a minus sign; the separate bit-pattern section shows fixed-width bytes.
Ready to convert.
Converted integer
Source and target bases appear here.
Bit-pattern view
Bit lengths will appear here.
Two’s-complement bytes are shown only if the signed value fits your chosen width. Big-endian lists the most significant byte first; little-endian reverses complete bytes. This is a numeric view, not text encoding.
Conversions run locally with native exact integer arithmetic. No processing upload or stored number history is used. Website ads and analytics follow our privacy information.
Using Number Base Converter
Convert integers without floating-point rounding and compare their common-base and fixed-width byte representations.
- Enter an integer and source/target bases 2–36. Prefix override recognizes 0x hexadecimal,0b binary and 0o octal; underscores may separate digit groups.
- Review common bases and minimum bit lengths. Optionally interpret an unsigned input pattern as a signed two’s-complement value at 8–128 bits.
- Copy exact digits or download JSON/TXT. Choose a larger signed width if the separate bit-pattern view reports that the value does not fit.
Example
Large integer demo converts 18446744073709551615 exactly to FFFFFFFFFFFFFFFF in hexadecimal. 8-bit signed demo interprets 0xFF as −1. The ordinary binary result is −1; the fixed-width bit pattern is 11111111.
Questions & answers
Which bases and inputs are supported?
Integer bases 2–36 using0–9 and A–Z, case-insensitive input and uppercase output. Up to 1,000 digits, optional leading plus/minus and underscores between nonempty digit groups. Fractions, exponent notation and internal spaces are rejected.
Are large integers rounded?
No. Native BigInt arithmetic accumulates every digit exactly and formats the exact result. JSON stores numbers as digit strings, so it does not lose precision through JSON numeric fields.
How are prefixes handled?
Enabled prefix override chooses base 16 for 0x,2 for 0b and 8 for 0o. Without override, a prefix is stripped only when it matches the selected source base. A leading zero alone does not select octal.
Why does binary show a minus sign?
Ordinary base conversions represent the signed integer with a minus sign. A fixed-width two’s-complement pattern is a separate representation shown below, only when the value fits that signed width.
How does signed pattern interpretation work?
An unsigned input must fit0 through 2^width −1. If its top bit is set, subtract2^width to obtain the signed value. At8 bits,255 becomes−1;128 becomes−128. Negative input patterns are rejected.
What does minimum signed bit length mean?
The smallest two’s-complement width needed to preserve the signed value. Positive values need a sign bit; zero and −1 need one bit. Unsigned bit length is reported only for nonnegative values.
What is endian order?
Big-endian bytes list the most significant byte first; little-endian reverses complete bytes. The binary and hexadecimal pattern retain their normal numeric display order. No text encoding is implied.
Can a value convert even if its bit pattern does not fit?
Yes. Exact base conversion is independent of the optional8/16/32/64/128-bit signed view. A too-small width reports a warning for that view without changing the integer.
Are numbers uploaded or stored?
No processing upload or saved input history is used. Conversion runs locally using native integer arithmetic and existing copy/download helpers. Website ads and analytics follow the privacy information.
Help improve this tool
Report a problem or suggest an improvement
Describe the issue without pasting private tool input. Feedback goes to our admin inbox.
