This numeral system converter converts any non-negative integer between the four positional number systems used in mathematics and computing: decimal (base 10), binary (base 2), octal (base 8), and hexadecimal (base 16). Every number system uses a different set of symbols and a different positional weight, but they all represent the same underlying quantity. Decimal uses digits 0 through 9 and is the system you use every day. Binary uses only 0 and 1, mapping directly to the on/off states of transistors in digital hardware. Octal uses 0 through 7 and is used in Unix file permission codes and some assembly languages. Hexadecimal uses 0 through 9 and then A through F for values 10 to 15, giving a compact notation for large binary numbers because each hex digit represents exactly four binary bits. The converter uses JavaScript's built-in parseInt to parse your input in the selected base, then calls toString with each target base to produce the output. You choose a base from the dropdown, enter an integer in that base using the correct digits for that system (binary accepts only 0 and 1; hex accepts 0-9 and A-F), and all three other representations appear immediately. The result for hex is displayed in uppercase. This tool suits programming students, network engineers working with IP and MAC addresses, system administrators writing chmod permissions, developers debugging bit flags, and anyone who needs to cross-check a value across number bases. The converter handles integers only; it does not support fractional values in any base.
The converter calls parseInt(value, base) to parse your input string as a number in the chosen base, producing a standard JavaScript integer. It then calls that integer's .toString(base) method with each target base (2, 8, 10, 16) to produce the output strings. Hexadecimal output is converted to uppercase. If the input contains characters that are not valid for the selected base, they are ignored and the remainder is parsed. Very large integers may lose precision above 2^53 because JavaScript uses 64-bit floating-point internally.
Starting from 255 in decimal: parseInt('255', 10) = 255. Calling (255).toString(16) gives 'ff', shown as FF. Calling (255).toString(2) gives '11111111'. Calling (255).toString(8) gives '377'. These match the default values pre-filled in the converter above.
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.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
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-07-19 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.