Skip to content
Convertor de baze numerice
Tools

Convertor de baze numerice

Nou

Convertește între binar, octal, zecimal, hex și orice bază de la 2 la 36.

bits bytes decimal digits fits in
Quick reference — decimal 0 to 16
Decimal Binary Octal Hex
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
16 10000 20 10

Runs entirely in your browser. Nothing is uploaded.

Convert between any number base, exactly

This number base converter shows binary, octal, decimal and hexadecimal side by side, plus an any-base field for every radix from 2 to 36. Edit any one value and the rest update live, so converting decimal to binary, hex to decimal, binary to hex or any other combination takes a single keystroke — no buttons to press and no page reloads.

It's a full number base converter calculator that handles the awkward cases too: negative numbers, a leading 0x, 0b or 0o prefix when you paste from code, and optional digit grouping to make long values readable.

Binary, octal, decimal and hexadecimal explained

A number's base (or radix) is simply how many digits it uses. Binary (base 2) is the language of hardware; octal (base 8) packs three bits per digit; decimal (base 10) is everyday counting; and hexadecimal (base 16) packs four bits per digit using 0–9 and A–F. The same quantity wears all four: decimal 250 is 11111010 in binary, 372 in octal and FA in hex.

See every conversion worked out, step by step

Turn on Show steps and the tool becomes a teaching aid. It expands a number to decimal with the positional method — each digit multiplied by its place value, e.g. binary 1101 = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 13 — and converts decimal to another base with the division-remainder method, listing every division and remainder so you can read the answer from the bottom up.

Choose any 'from' and 'to' base in the steps panel to follow conversions like binary to hex or base 10 to base 36. It's the rare number base converter with steps that shows the real arithmetic rather than just the result — useful for students checking homework or anyone learning how base conversion actually works.

Built for big numbers

Most converters quietly lose precision once a value passes the 64-bit mark, because they fall back to floating-point maths. rapidtables.com and calculator.net both have this limitation for very large inputs. This big number base converter uses JavaScript's arbitrary-precision BigInt, so a 300-digit decimal, a thousand-bit binary string or a long hexadecimal hash all convert exactly — every digit intact.

A live metrics row reports the bit length, byte count and the smallest standard width (8-, 16-, 32-, 64- or 128-bit) that holds your number, which is handy when you're sizing fields or checking whether a value overflows a specific data type.

How it compares to RapidTables and WolframAlpha

rapidtables.com is the go-to for quick conversions, but it uses separate pages per conversion direction (decimal to binary on one page, binary to decimal on another), tops out at base 16, and doesn't show step-by-step working. WolframAlpha shows steps but requires a Pro subscription for full working, sends every query to Wolfram's servers, and is slow for interactive use.

This converter puts all four bases on one screen, supports bases 2–36, shows full step-by-step working for free, handles arbitrarily large integers without precision loss, and runs entirely in your browser. No account, no subscription, no data sent anywhere. Works on iPhone, Android, tablet and desktop.

Private, instant and free

There's nothing to install and no account to create. Every conversion — from a single bit to a 1,000-digit integer — happens locally in your browser, so the numbers you convert never leave your device. Bookmark this number base converter and reach for it whenever you need to switch between binary, octal, decimal, hex or any base in between.

How place value works in any base

Every positional numeral system is built on one idea: a digit's contribution to the total equals digit × baseposition, where positions are counted from zero starting on the right. In decimal (base 10) the number 347 means 3×10² + 4×10¹ + 7×10⁰ = 300 + 40 + 7. Swap the base to 2 and the same rule gives you binary; swap it to 16 and you get hexadecimal. The arithmetic is identical — only the base changes.

Humans settled on base 10 for an anatomical reason: ten fingers. Merchants and mathematicians who counted on their hands naturally fell into groups of ten, and the habit solidified across civilisations independently. Binary (base 2) exists for an entirely physical reason: transistors, the building blocks of every processor, have only two stable electrical states — on and off. Mapping those states to 1 and 0 makes binary the native language of hardware. No other base maps as cleanly onto the physics of a switch.

Understanding place value is the key to converting any number by hand. To read 10110 in binary: 1×2⁴ + 0×2³ + 1×2² + 1×2¹ + 0×2⁰ = 16 + 0 + 4 + 2 + 0 = 22 in decimal. Enable the Steps panel in this tool to watch that expansion play out digit by digit for any number you enter, in any source base.

Hexadecimal in everyday computing

The reason programmers gravitate to hexadecimal is a clean power-of-two relationship: one hex digit represents exactly 4 bits (called a nibble), so one 8-bit byte collapses to just two hex digits. The byte 11111111 in binary is FF in hex — far easier to read and type. A 32-bit value that would take 32 binary digits fits in 8 hex digits, and a 128-bit UUID fits in 32. Hex is binary made human-readable.

You encounter hexadecimal constantly without always noticing. CSS color codes like #FF5733 are three hex bytes: FF for red, 57 for green, 33 for blue. Memory addresses in debuggers and crash logs print as hex (0x7FFE4B2C). SHA-256 hashes are 64 hex digits (256 bits ÷ 4). MAC addresses such as A4:C3:F0:85:AC:2D are six hex bytes separated by colons. IPv6 addresses are eight groups of four hex digits, covering 128 bits in a compact form that would be unreadable in decimal.

The A–F letter digits in hexadecimal represent the values 10 through 15. That's not arbitrary — it's the minimum alphabet needed to express every possible nibble with a single character, keeping one-to-one parity between hex digits and 4-bit groups. Enter any CSS hex color or memory address into the Hexadecimal field of this converter and you'll immediately see its decimal value, its octal form, and its full 24- or 32-bit binary representation.

Octal and Unix file permissions

Octal (base 8) was an early favourite in computing because one octal digit maps exactly to three binary bits. On machines like the PDP-8 minicomputer of the 1960s, whose word size was a multiple of three bits, octal made debugging printouts far more compact than binary without any translation cost. Today octal is niche, but it survives in one very visible place: Unix and Linux file permissions.

The command chmod 755 sets a file's permissions to rwxr-xr-x. Each octal digit maps to three bits representing read (4), write (2) and execute (1) for owner, group and others respectively. The digit 7 = 4+2+1 = 111 in binary = read, write and execute. The digit 5 = 4+0+1 = 101 = read and execute only. The digit 5 repeated for the final group gives the same permissions to everyone else. A permission mask like chmod 644 (owner read/write, others read-only) becomes immediately obvious when you see 6 = 110 and 4 = 100 as binary triplets.

Octal is less common than hex today primarily because modern hardware is byte-oriented — bytes are 8 bits, not 6 or 9 — so octal digits don't align neatly with bytes the way hex digits do. Nevertheless, any Unix developer who works with chmod, umask or file-mode constants in C (S_IRWXU = 0755) is doing octal arithmetic. The Octal field in this converter lets you verify a permission mask at a glance: type 755 and instantly see the binary breakdown 111 101 101.

Binary arithmetic: two's complement, overflow, and bitwise operations

Computers store negative integers using two's complement, not a simple sign bit, because two's complement lets addition hardware work identically for positive and negative numbers. To negate a number in two's complement: flip every bit, then add 1. In an 8-bit register, −1 is represented as 11111111 — flip the bits of 1 (00000001) to get 11111110, add 1, and arrive at 11111111. Adding that to 00000001 gives 100000000, which overflows the 8-bit boundary and leaves 00000000 — exactly 0, which is the correct result of −1 + 1.

Overflow occurs when a result exceeds the register's bit width. In a signed 8-bit integer the maximum is 127 (01111111); adding 1 wraps it to 10000000, which two's complement interprets as −128. This is a real source of bugs in low-level code, which is why languages expose overflow-safe arithmetic and why knowing binary representation matters in practice.

Bitwise operations — AND, OR, XOR, NOT, and bit shifts — work on individual bits in parallel and appear everywhere in systems programming. AND with a mask zeroes out bits you want to ignore (flag testing: flags & 0b0100 isolates bit 2). OR sets bits (flags | 0b0100 switches bit 2 on). XOR toggles bits and is the basis of many fast checksum and encryption routines. A left shift by n multiplies by 2ⁿ; a right shift by n divides by 2ⁿ — both are cheaper than multiplication on most CPUs. Inspecting a number's binary form in this converter is the fastest way to reason about which bits a mask will affect.

Frequently asked questions

How do I convert between number bases?

Type your number into any of the Binary, Octal, Decimal or Hexadecimal fields and every other field updates instantly — there's also an 'Any base' field for radixes 2 to 36. The tool reads your digits into a single value, then re-expresses that value in each base. For example, type 255 in Decimal and you immediately get 11111111 (binary), 377 (octal) and FF (hex). Turn on 'Show steps' to see the arithmetic worked out digit by digit. Sites like rapidtables.com convert one direction at a time; here all four fields update simultaneously.

How do I convert binary to decimal?

Multiply each binary digit by 2 raised to the power of its position (counting from 0 on the right) and add the results. For 1101: 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13. So binary 1101 equals decimal 13. Paste the bits into the Binary field here and the Decimal field shows the answer instantly, with the full positional expansion available under 'Show steps'. Most online converters including calculator.net show only the result; this one shows every step of the working.

How do I convert decimal to binary?

Repeatedly divide the decimal number by 2 and write down each remainder, then read the remainders from bottom to top. For 13: 13÷2=6 r1, 6÷2=3 r0, 3÷2=1 r1, 1÷2=0 r1 — read upward gives 1101. Type 13 in the Decimal field to get 1101 in Binary, or switch the steps panel to 'from 10 to 2' to watch the division-remainder method play out step by step. WolframAlpha can do this too, but it requires an internet query and doesn't show all intermediate divisions on its free tier.

How do I convert hexadecimal to decimal (and back)?

Each hex digit is worth 0–15 (A=10, B=11, F=15), and you multiply by 16 raised to its position. Hex 2F = 2×16¹ + 15×16⁰ = 32 + 15 = 47. To go back, divide by 16 and collect remainders: 47÷16=2 r15(F), 2÷16=0 r2, giving 2F. Enter 2F in the Hexadecimal field or 47 in Decimal and the tool converts both ways automatically. Unlike rapidtables.com where you navigate to separate pages for each direction, both conversions happen on one screen here.

How do I convert binary to hexadecimal?

Because one hex digit equals exactly four binary digits (a nibble), you can group the bits in fours from the right and translate each group. Binary 11010110 splits into 1101 0110, which is D6 in hex (and 214 in decimal). Type the binary value here and read the Hexadecimal field directly — no manual grouping needed, even for very long bit strings. This is the same technique used in hardware datasheets and assembly language debugging, where bit-to-hex mapping is essential.

What is a number base (radix)?

The base, or radix, is how many distinct digits a numeral system uses and what each position is worth. Decimal (base 10) uses digits 0–9 with place values of 1, 10, 100; binary (base 2) uses 0–1 with place values 1, 2, 4, 8; octal (base 8) uses 0–7; and hexadecimal (base 16) uses 0–9 plus A–F. The same quantity can be written in any base — 100 in decimal is 1100100 in binary, 144 in octal and 64 in hex. All conversions run instantly in your browser without sending any data to a server.

How do I convert to an arbitrary base like base 36?

Use the 'Any base' field and pick a base from 2 to 36 — bases above 10 borrow letters, so base 36 runs 0–9 then A–Z (A=10, Z=35). For example decimal 1295 in base 36 is ZZ, because ZZ = 35×36 + 35 = 1295. Base 36 is popular for compact IDs and short URLs since it packs the most information per character using only letters and numerals. Most free online converters top out at base 16 or base 32; this tool supports every radix from 2 to 36 in a single interface.

How does base conversion work step by step?

Switch on 'Show steps' to see the full working. Converting between two non-decimal bases is done in two phases: first expand the source number to decimal using the positional method (each digit × base^position), then convert that decimal to the target base using repeated division and remainders. For binary 1010 to hex: 1010 becomes 10 in decimal, then 10 divided by 16 gives remainder A, so the hex result is A. The steps panel lays out every multiplication, division and remainder so you can check the work or use it to study for exams.

How do I convert very large numbers?

This converter uses arbitrary-precision big-integer maths, so there's no 64-bit ceiling and no rounding. You can paste a 300-digit decimal, a thousand-bit binary string or a long hexadecimal hash and every base stays exact — unlike calculator.net and many other online converters that switch to floating point and silently corrupt the last digits of values above 2^53. Numbers like a 128-bit value (up to 340,282,366,920,938,463,463,374,607,431,768,211,455) convert without losing a single digit.

What is octal and where is it used?

Octal is base 8, using digits 0–7, and each octal digit maps to exactly three binary bits. Its most common modern use is Unix/Linux file permissions: chmod 755 means 111 101 101 in binary — read/write/execute for the owner and read/execute for others. Octal also appears in older computing systems and some character escapes in C and Python strings. Type a number in the Octal field to see its binary, decimal and hex equivalents instantly, with no page reload required.

Why is hexadecimal used in computing?

Hex is a compact, human-friendly shorthand for binary: one hex digit equals four bits, so a single byte (8 bits) is just two hex digits. That makes hex ideal for memory addresses, colour codes (#FF8800), MAC addresses, byte dumps and debugging, where long binary strings would be error-prone. For example the byte 11111111 is simply FF, and the colour orange #F59E0B is far easier to read than its 24-bit binary form. This tool converts any CSS hex colour code as a standard hexadecimal number.

What's the difference between binary, octal, decimal and hexadecimal?

They're the same numbers written with different numbers of digits. Binary (base 2) is what hardware actually stores; octal (base 8) groups bits in threes; decimal (base 10) is everyday human counting; and hexadecimal (base 16) groups bits in fours for compact display. The decimal value 250, for instance, is 11111010 in binary, 372 in octal and FA in hex — identical quantity, four notations. This converter shows all four simultaneously so you can compare them at a glance.

How many bits is one hexadecimal or octal digit?

One hexadecimal digit represents exactly 4 bits (a nibble), so two hex digits make one 8-bit byte — that's why FF = 255 and a 32-bit value fits in 8 hex digits. One octal digit represents exactly 3 bits, so three octal digits cover 9 bits. The live metrics row in this tool shows the bit length, byte count and which standard width (8-, 16-, 32-, 64- or 128-bit) your number fits in, saving you from having to calculate it manually.

Does it work offline and is it private?

Yes to both. Every conversion runs locally in your browser with JavaScript BigInt — nothing is sent to a server, logged or stored remotely, so even sensitive values like cryptographic keys or hashes stay on your device. WolframAlpha and RapidTables send your inputs to their servers with each query. Here, once the page has loaded you can keep converting with no internet connection, and there's no sign-up, no limits and no cost.

Can I use the base converter on my phone?

Yes. The converter is fully responsive, so the input fields, the 'Any base' selector and the steps panel all work on a phone or tablet browser — Safari on iPhone, Chrome on Android, or any modern mobile browser. There's no app to download. Because all the maths runs in JavaScript on your device, conversions are just as instant on mobile as on desktop, and they keep working with no signal once the page has loaded. You can add the page to your home screen to open it like a standalone app.