BrowserTools

Number Base Converter

Binary, octal, decimal, hex and any base 2–36

By Guga — BrowserTools maintainer, Tbilisi, Georgia Updated 2026-09-21
Free Private No uploads
What is Number Base Converter?

One asymmetry is worth stating up front: this converter will read a number written in any base from 2 to 36, but it only ever writes the answer in four of them — binary, octal, decimal and hexadecimal. Those are the four that turn up in code, and a value you type in base 7 or base 36 is accepted as input and reported in the other four. Parsing is strict about the digits you supply: a digit that does not exist in the chosen base, a leading minus sign or a decimal point all cause the result to be rejected rather than silently misread. The conventional 0x, 0b and 0o prefixes are stripped when they match the base you selected, and stray whitespace is ignored. Integers only, up to the exact range of a double, which is 9007199254740991.

Convert numbers between decimal, binary, octal, hexadecimal and any base from 2 to 36. Includes bit grouping and quick presets — the everyday companion for programmers.

Private Number Base Converter In Your Browser

Number Base Converter is processed locally with client-side JavaScript. Your files never touch a server, and there is no queue to wait in.

Step-by-Step

How to use Number Base Converter

1

Enter the number in the Number field, using the digits valid for the base you intend.

2

Choose the base it is written in from the Input base dropdown, or click the bin, oct, dec or hex shortcut beside it.

3

Read the four result cards, each with its own copy button, and note that hexadecimal is shown in capitals.

4

Use the All at once panel when you want the four values together as labelled lines in one block.

Key Capabilities
  • Input accepted in any base from 2 to 36, with letters a to z as digits above 10
  • Output shown in binary, octal, decimal and hexadecimal, each individually copyable
  • 0x, 0b and 0o prefixes handled automatically for their matching bases
  • Invalid digits, negatives, decimals and out-of-range values rejected with an explanation
Common Use Cases
  • A developer reading a hex colour constant and needing its decimal and binary forms side by side.
  • A systems student working through an octal file permission such as 755 and checking the equivalent bit pattern.
  • A database engineer inspecting an identifier stored as 0x1F4 and confirming it is the decimal 500 it should be.
Clear Answers

Frequently Asked Questions

Why can't I convert to base 7 if I can type in base 7?
The readout is fixed to the four bases that matter in practice — binary, octal, decimal and hexadecimal. A value entered in any other base is fully parsed and then reported in those four. If you specifically need another base, do the arithmetic from the decimal figure it prints, or chain the value through a language that has the conversion built in.
Why is my number rejected when there is nothing wrong with it?
Three things are refused outright: a digit that does not exist in the selected base (7 in base 7, or Z in base 16), a minus sign, and a decimal point. So is anything past 9007199254740991, the largest integer a double can hold without losing digits. Half of the rejections are the tool being careful rather than being broken.
Is the conversion exact for large values?
Up to 9007199254740991, yes, and the tool refuses anything larger instead of quietly rounding it. The limit comes from the 53-bit mantissa of a double-precision number. Beyond it, two different integers can share one representation, so a converter that returned an answer would be lying by a digit or two.
Does it matter that hexadecimal is shown in capitals?
Only cosmetically. The per-base cards and the combined panel differ in case — cards use capitals, the combined panel lower case — but the value is identical and hexadecimal digits are not case-sensitive. Copy whichever matches the style of the code you are writing into.