Converters

Base Converter

Convert numbers between any radix from base 2 to base 36, whole or fractional — and see why a tenth that terminates neatly in decimal repeats forever in binary.

Base Converter

Results recalculate instantly on every keystroke. Nothing you type is transmitted.

Value
Bases
Precision
Converted Value
Digits above 9 use letters, so A is 10 and Z is 35. Case is ignored on input and output is upper case.
In Decimal
In the Common Bases
Positional Expansion
Does the Fraction Terminate?
Digits Required
Why Base 36 Is the Ceiling
Where This Base Is Used

What this result does not account for

  • Bases 2 to 36 only, because base 36 exhausts the digits and letters.
  • Fractional expansions are truncated at the chosen precision and may not terminate.
  • Arithmetic uses double-precision floats, so integers beyond about 2^53 lose exactness.
  • The termination test infers the denominator from the decimal value and is exact only for fractions that are themselves finite in decimal.
Zero-Server Execution Updated 11 Aug 2026 Reviewed by Sana Khalid IEEE-754 Double Precision

In short: A positional base writes a number as digits multiplied by powers of the radix, so 255 is FF in base 16, 377 in base 8 and 11111111 in base 2. Bases above 10 borrow letters, A to Z, giving a practical ceiling of base 36. The subtle part is fractions: a fraction terminates only if its denominator's prime factors all divide the base, which is why 0.1 terminates in decimal but repeats forever in binary — the root of floating-point error.

Formula

value = ∑ digiti × basei
25510 = FF16 = 3778 = 111111112
a fraction terminates in base b ⇔ every prime factor of the denominator divides b

Digits run 0–9 then A–Z, so A is 10 and Z is 35. Base 36 exhausts the alphabet.

Worked Example

  1. Expand by position. FF in hex is 15×16¹ + 15×16⁰.
  2. That gives decimal. 240 + 15 = 255.
  3. Divide repeatedly by the target base. 255 ÷ 2 leaves remainders 1,1,1,1,1,1,1,1.
  4. Read the remainders upward. 111111112.
  5. Check fractions separately. Multiply the fraction by the base repeatedly and read the whole parts.

The bug that is not a bug. Ask almost any programming language for 0.1 + 0.2 and it answers 0.30000000000000004. Nothing is broken. One tenth is a tidy terminating decimal because 10 has prime factors 2 and 5, and the denominator is 10. In binary the only prime factor available is 2, the 5 has nowhere to go, and one tenth becomes 0.0001100110011... repeating forever. A 64-bit float must stop somewhere, so it stores a value very slightly off, and two such values added together miss 0.3 by about 5.5×10−17. Financial code avoids this by working in integer minor units — counting paise or cents rather than rupees or dollars — which is the same trick as choosing a base where the fraction terminates.

Strengths & Limits Of This Model

Where this engine is strong

  • Handles arbitrary radix from 2 to 36 in both directions, including fractions.
  • Tests and explains whether a fraction terminates, using prime factors rather than assertion.
  • Shows the positional expansion so the arithmetic is visible.

Where it stops

  • Not an arbitrary-precision calculator.
  • Does not cover machine representation such as two's complement or IEEE 754, which the binary converter handles.
  • Bases above 36 are out of scope.

Risk & accuracy notice. Truncating a non-terminating fractional expansion is unavoidable and makes the displayed value an approximation; never round-trip money through a fractional base conversion.

Practical Use Cases

Reading hexadecimal in code or a colour picker

#FF8800 is three bytes; each pair of hex digits is one channel from 0 to 255.

Understanding Unix file permissions

Octal 755 is three groups of three bits: read-write-execute for owner, read-execute for group and others.

Explaining floating-point error

Showing concretely why 0.1 cannot be stored exactly in binary.

Compact identifiers

Base 36 packs the most value per typeable character — pair with the Binary Converter for machine-level representation.

Methodology & Editorial Standards

Integer conversion is exact in both directions and has been verified to round-trip for every base from 2 to 36 across a range of magnitudes. Parsing expands each digit by its positional weight; output is produced by repeated division with remainder. Fractional parts are converted by repeated multiplication by the target base, taking the whole part at each step, and are necessarily truncated at the chosen precision because an expansion may not terminate. The termination test is exact number theory rather than observation: a fraction expressed in lowest terms terminates in base b if and only if every prime factor of its denominator also divides b. The card reports the prime factorisation of both the denominator and the base so the conclusion can be checked by eye. All arithmetic uses double-precision floats, so very large integers beyond about 2^53 and very long fractional expansions will show the limits of that representation — which is itself the subject of the fraction card. All conversion factors are exact by definition under the International System of Units, or exact by international agreement where the unit is defined by treaty. Values are held at full IEEE-754 double precision internally and rounded only for display, so chained conversions do not accumulate drift.

Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.

This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.

Sana Khalid Principal Front-End Engineer · ApexConverter

SI metrology and unit-system conversion accuracy. Last reviewed: 11 August 2026.

Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.


Base Converter — 8 Expert FAQs

8 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.

What is 255 in hexadecimal?

FF. Each hex digit holds four bits, so two hex digits cover a full byte from 00 to FF, which is 0 to 255 in decimal. This is why colour codes such as #FFFFFF are six hex digits: three channels of one byte each, and FF means a channel is at maximum.

Why does computing use hexadecimal instead of decimal?

Because 16 is a power of 2 and 10 is not. One hex digit maps to exactly four bits with no arithmetic, so a byte is always two hex characters and a 32-bit address is always eight. Decimal has no such clean relationship to binary, which makes it useless as a shorthand for machine values.

Why is 0.1 + 0.2 not 0.3?

Because 0.1 cannot be written exactly in binary. A fraction terminates only when the prime factors of its denominator divide the base. Ten factors into 2 and 5, but binary offers only 2, so one tenth repeats forever. The stored value is slightly off, and the error surfaces when two such values are added, giving 0.30000000000000004.

What is the highest base I can use?

Base 36 in practice, because the digits run out. Zero to nine gives ten symbols and A to Z gives twenty-six more, totalling thirty-six. Higher bases such as base 62 exist by distinguishing upper from lower case, but they are fragile to transcribe and impossible to read aloud unambiguously.

How do I convert a fraction between bases?

Multiply the fractional part by the target base, write down the whole part of the result as the next digit, keep the remainder and repeat. For 0.5 into binary: 0.5 times 2 is 1.0, so the first digit is 1 and nothing remains, giving 0.1 exactly. For 0.1 into binary the process never terminates, which is the whole problem.

What is base 12 good for?

Divisibility. Twelve divides evenly by 2, 3, 4 and 6, while ten divides only by 2 and 5, so thirds and quarters are tidy in duodecimal and messy in decimal. It survives in the twelve inches of a foot, the twelve months of a year, the dozen and the two twelve-hour halves of the clock.

Why is octal used for file permissions?

Because each octal digit is exactly three bits, and Unix permissions come in groups of three: read, write and execute. So 7 is 111, meaning all three granted, and 5 is 101, meaning read and execute but not write. The familiar 755 and 644 are just three such groups for owner, group and others.

Do whole numbers always convert exactly?

Yes. Any integer has an exact representation in every base, and converting back returns the original value with no loss. Only fractions can fail to terminate. That asymmetry is why financial systems store money as an integer number of minor units, sidestepping the problem entirely rather than fighting it.

Related Converters Engines