Base-n Converter

The base-n converter converts any number from one number base to another, supporting any base from 2 (binary) to 36. Every positional number system uses a base, also called a radix, which defines how many distinct digit symbols are available and what each digit position is worth. Base 10 (decimal) uses the digits 0 through 9 and is the system you use every day. Base 2 (binary) uses only 0 and 1 and is the native language of computers. Base 16 (hexadecimal) uses 0 through 9 and the letters A through F, and is widely used to represent memory addresses, colour values, and byte data compactly. Bases higher than 10 use the letters of the alphabet as extra digit symbols: A represents 10, B represents 11, and so on up to Z representing 35 in base 36. You enter the number you want to convert and select both the original base and the target base. The calculator converts your input to base 10 as an intermediate step, then converts from base 10 to the target base using repeated division, and shows you the step-by-step division table so you can trace exactly how each digit of the result is produced. The result is displayed in uppercase. The tool is useful for students learning digital electronics, developers working with binary or hex data, and anyone exploring the mathematics of positional notation. Inputs must use only valid digit characters for the chosen source base; letters A to Z are accepted for bases above 10. Results are exact for integers.

Conservation Amendment Bill
FF
base 10 (255) converted to base 16
Decimal (base 10) value255
Binary (base 2)11111111
Octal (base 8)377
255 / 16 = 15 remainder 15 (F) 15 / 16 = 0 remainder 15 (F) Reading remainders bottom to top: FF

How it works

The conversion uses a two-step process. Step 1: convert the source number to base 10 using JavaScript's parseInt(value, fromBase), which evaluates each digit position as a power of the source base. Step 2: convert the base-10 integer to the target base using decimalValue.toString(toBase), which implements repeated division internally. The step-by-step table shown below the result illustrates the repeated division manually: at each step, the current value is divided by the target base, the remainder becomes a digit of the result (reading from bottom to top), and the quotient becomes the next dividend. Digits above 9 are shown as letters (A=10, B=11, ..., F=15 in hex).

Worked example

Using the default values: 255 in base 10 converted to base 16 (hexadecimal). Step 1: 255 in decimal is already base 10, so no conversion needed. Step 2: 255 divided by 16 is 15 remainder 15 (F). 15 divided by 16 is 0 remainder 15 (F). Reading the remainders from bottom to top gives FF. This matches the hex colour #FF used in web design for full-intensity red, green, or blue channels.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-06-25 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.