SunnyTools

Developer Tools

Number Base Converter

Convert integers between base 2 and base 36 with browser-local BigInt precision, including binary, octal, decimal, hexadecimal, prefixes, negative numbers, and very large values.

Your input is processed locally in your browser and is not uploaded to a server.

Main result

-

BaseNameResultCopy
2Binary
-
8Octal
-
10Decimal
-
16Hexadecimal
-

Load example

  • Decimal 255 to Hexadecimal FF
  • Binary 101010 to Decimal 42
  • Hexadecimal 7B to Decimal 123
  • Decimal -64 to Binary -1000000

What is Number Base Converter?

Number Base Converter converts whole numbers between binary, octal, decimal, hexadecimal, and custom bases from 2 to 36.

How to use it

Enter an integer, choose the input base or Auto Detect for 0b, 0o, and 0x prefixes, choose an output base, then press Convert. The main result and the common base table can be copied separately.

How it works

The converter validates each digit for the selected base, parses the integer into a BigInt without using JavaScript Number for the entered value, and formats that exact BigInt into the requested base.

Is data saved?

Your input is processed locally in your browser and is not uploaded to a server.

What is a number base?

A number base defines which digits can be used and how much each digit position is worth. Base 10 is the everyday decimal system, while computers often use base 2 and base 16 because they map cleanly to bits and bytes.

Binary, octal, decimal, and hexadecimal

Binary uses only 0 and 1. Octal uses 0 through 7. Decimal uses 0 through 9. Hexadecimal uses 0-9 and A-F, so it is common in programming, memory addresses, color codes, binary data, and debugging.

Custom bases from 2 to 36

For bases above 10, letters represent digit values: A is 10, B is 11, and Z is 35. Input accepts uppercase or lowercase letters, and results can be shown in uppercase or lowercase.

Conversion examples

Use the examples to check familiar conversions before converting your own values.

  • Decimal 255 becomes binary 11111111, octal 377, and hexadecimal FF.
  • Binary 101010 becomes decimal 42.
  • Hexadecimal 7B becomes decimal 123.
  • Decimal -64 becomes binary -1000000.

Common use cases

Base conversion is useful when reading low-level data or moving between human-friendly and machine-friendly representations.

  • Convert decimal values to binary for bit masks and flags.
  • Convert hexadecimal values to decimal while debugging API payloads or logs.
  • Convert color or memory-related hex values into a format that is easier to inspect.
  • Check custom base values for coding challenges, tests, and data encoding exercises.

Precision with very large integers

The tool uses BigInt and a manual parser, so integers larger than 9007199254740991 are not rounded by JavaScript Number. Fractional values such as 10.5 are intentionally rejected in this version.

Related tools

Tools in the same category that are planned or ready to use.

JVDeveloper Tools

JSON Formatter & Validator

Format, minify, validate, and inspect JSON snippets.

64Developer Tools

Base64 Encoder/Decoder

Encode or decode Base64 text in your browser.

URLDeveloper Tools

URL Encoder/Decoder

Encode and decode URL-safe text.