Back to public tools
All tools
Browser utility

Number Base Converter

Convert numbers between binary, decimal and hexadecimal. Pick the base you’re starting with and the one you want. For example, binary 1010 is decimal 10.

Your inputs stay in your browser.

Enter a value, choose its source and target bases, then convert. Common bases appear below. Advanced settings adds fractions, computer formats and batch work.

Advanced settings

Number format and complete batches

Batch mode keeps every physical row, including errors, with up to 50 rows and 512 KiB input. A final line ending is ignored. Each value uses the same chosen mode and bases. Up to 4096 base digits are accepted per mathematical value.

Presentation and division steps

Steps repeatedly divide the absolute integer part by the target base. Read remainders upward and restore the original sign. Fractional expansion is shown separately. Traces exceeding 512 steps or 2 MiB are refused without changing the numeric conversion.

Byte order, ASCII and bitwise views

Byte views need a width divisible by 8 and a fitting integer/pattern. Both byte orders are shown. ASCII labels controls and non-ASCII bytes rather than assuming UTF-8. Endianness changes byte order, not the numeric value.

Bitwise views require integers and use the selected width. Negative operands use their fitting signed pattern; positive operands may use the full unsigned range. Left shifts explicitly mask overflowing bits and report loss. Arithmetic right shifts use the signed pattern interpretation. Invalid optional views leave the base conversion intact.

Mode: integer · Single value · Mathematical value. Closing Advanced settings preserves all choices.

Enter a value and source/target bases, then convert.

Values and results stay in this browser tab. No uploads or automatic storage. Clear retains one private Undo snapshot; refresh releases tool-held state.

How to use Number Base Converter

Convert exact values

Enter a value, its Source base and a Target base from 2 to 36, then Convert. Digits 0–9 and letters A–Z represent digit values; matching 0b, 0o and 0x prefixes belong to bases 2, 8 and 16. A leading minus sign is preserved. The first result is the target base, followed by binary, octal, decimal and hexadecimal as needed. Each mathematical value can contain up to 4096 digits.

Advanced settings selects exact fractions, two’s complement or IEEE inspection. Fraction mode accepts a point and a final repeating block, such as 0.(3). Parentheses in an answer mark an exact repeating cycle. An ellipsis means only the first selected 1–256 fractional digits are shown. The reduced exact ratio and unrepresented rational remainder remain in the complete report and JSON. A prefix is never presented as an exact finite value.

Uppercase changes letter case. Grouping adds spaces to the integer part of binary and hexadecimal views. Copies use ungrouped values unless Keep grouping is selected. Individual prefix-only downloads include the exact source ratio and unrepresented remainder. Exact swap uses a complete finite or repeating result and refuses values over the source digit limit. Swap is unavailable for batches, computer bit-pattern modes or IEEE inspection.

Inspect fixed-width integers and floats

Encode mode turns a fitting signed integer into its selected-width two’s-complement pattern. Decode mode reads an unsigned fitting pattern and shows the signed mathematical value. Widths from 1 to 4096 bits are supported. Signed bounds are enforced; conversion never silently truncates overflowing bits. Widths that are not multiples of four may need an extra leading zero in hex. Fixed binary width and unsigned/signed interpretations are shown separately from common-base values.

IEEE inspection offers binary32 and binary64. Decimal input is read as a JavaScript Number first and then stored in the selected format. Rounding, overflow and underflow can change it. Raw-bit input uses the source base and preserves the pattern, including NaN payload bits. Decoded Number, classification, sign, exponent and stored fraction bits are separate. Negative zero is retained. Common-base results in this mode describe the unsigned bit pattern rather than the mathematical float value.

View bytes, steps and operations

Byte views require an integer or bit pattern and a width divisible by eight. Big- and little-endian hex bytes are both shown. The chosen order controls ASCII interpretation. ASCII controls get names such as [NUL] and [LF]; bytes above 127 are explicitly non-ASCII. This is not UTF-8 decoding. Endianness changes byte order, not the numerical value.

Division steps repeatedly divide the absolute integer part by the target base. Read the remainders upward and restore the sign. Fractional expansion stays separate. A trace over 512 steps or 2 MiB is refused as a whole while the numerical conversion remains available.

Fixed-width bitwise views support AND, OR, XOR, NOT, left shift, logical right shift and arithmetic right shift. A second integer uses the source base. Negative operands must fit the signed width; nonnegative operands may use the full unsigned range. Left shift explicitly masks overflowing bits and reports any loss. Arithmetic right shift treats the pattern as signed. Invalid optional views leave the main conversion intact.

Batch and save practice material

Batch mode keeps every physical line, including invalid entries, up to 50 rows and 512 KiB total input. One final line ending is ignored. Every row uses the same mode and bases. Reports and JSON contain all values, results and errors; nothing is silently skipped.

Download conversion worksheet creates a self-contained printable HTML file with one question and matching answer per input row. It requires complete exact mathematical or two’s-complement results in every row; invalid rows, truncated expansions and IEEE inspection block worksheet export. Open the local file and use your browser’s Print command.

Edits clear stale results. Cancel conversion stops the owned local worker. Clear starts over, Try an example loads a large exact integer, and Undo restores one previous input/options/result snapshot. Copy has a fully selected manual fallback; full text and JSON downloads are available. Closing Advanced settings preserves all choices and output, with errors and active assumptions outside it.

Example: compare FF as a value and as a signed pattern

Enter FF in base 16 and convert to base 10 in exact integer mode. The mathematical answer is 255. Then choose Decode unsigned two’s-complement pattern with width 8. The same pattern now represents signed -1, while the original eight bits remain 11111111.

For a fraction example, enter 0.(3) in base 10 and convert to binary. The exact answer is 0.(01). For bytes, choose integer mode, enter 4142 in base 16 and select width 16 with byte views. Big-endian ASCII is AB; little-endian ASCII is BA.

About number bases and computer formats

A positional base changes how a mathematical value is written. A fixed-width computer pattern adds an interpretation: the same bits can describe an unsigned integer, a two’s-complement signed integer, bytes or a floating-point value. These interpretations are labelled separately here.

Repeating fractions are exact rational values. A bounded digit prefix is an approximation, so the original reduced ratio is always retained. IEEE floats instead inspect the browser’s actual stored binary32 or binary64 format and its special zero, subnormal, infinity and NaN cases.

Values and results stay in this browser tab, with no upload or automatic storage. Clear keeps one private Undo snapshot; refresh releases tool-held data. Downloaded files remain on your device.

Format references: DataView floating-point reads and ECMAScript 2026 specification.

Stars and feedback

Loading…

Tool reference #130