This converter lets you type a number in any of the four most common positional number systems and see the equivalent in all three other bases instantly. Type in the binary field and the decimal, hexadecimal, and octal fields update in real time. Type in the hex field and the others follow. The same works for octal and decimal. Binary (base 2) uses only the digits 0 and 1 and is the native language of digital hardware. Hexadecimal (base 16) uses digits 0 through 9 and letters A through F, and is widely used in programming, colour codes, memory addresses, and checksums because each hex digit represents exactly four binary bits, giving a compact shorthand for long binary strings. Octal (base 8) uses digits 0 through 7 and appears in Unix file permission codes and some legacy computing contexts. Decimal (base 10) is the everyday number system most people use. The converter uses JavaScript's parseInt to parse each input in its respective base, then uses toString to convert to the other three bases. Hexadecimal output is shown in uppercase. The binary field accepts only 0s and 1s; the octal field accepts 0 through 7; the hex field accepts 0 through 9 and A through F (case-insensitive). Invalid characters are ignored and the remaining valid digits are parsed. This tool is useful for programming students learning base conversion, developers debugging bitwise operations, network engineers reading MAC addresses and IPv6 in hex, and system administrators writing chmod commands in octal. The converter handles non-negative integers only; it does not support negative numbers or fractional values in any base.
When you type in any field, the converter reads the value from that field and calls parseInt(value, base) to convert it to a JavaScript integer. It then calls (n).toString(2), (n).toString(8), (n).toString(10), and (n).toString(16) to populate all four output fields and the results card. To prevent update loops, the converter temporarily removes event listeners from the other three fields while updating them, then reattaches them after. Hexadecimal values are displayed in uppercase. Numbers above 2^53 - 1 may lose precision due to JavaScript using 64-bit floating-point representation.
Enter FF in the hexadecimal field: parseInt('FF', 16) = 255. Converting 255 to binary gives 11111111. Converting to octal gives 377. The decimal value is 255. These match the default values pre-filled in all four input fields 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.
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.