gizmobench
BrowseDaily

Number Base Converter

Convert a whole integer from any base 2 to 36 into a separately selected output base. Binary, octal, decimal, hex and base 36 appear together, with exact BigInt arithmetic for large values and a signed-width readout for negative integers. Open Conversion steps for the positional expansion and division remainders. Prefixes can identify the input base; fractions, floating-point bit patterns and byte-to-text decoding are different jobs.

Decimal37359285590xDEADBEEF hexadecimal · 32 bits · fits u32
Value
From base
To base
Conversion steps
  1. Read DEADBEEF in base 16 by place value:
  2. D = 13; 13 × 16^7 = 3489660928
  3. E = 14; 14 × 16^6 = 234881024
  4. A = 10; 10 × 16^5 = 10485760
  5. D = 13; 13 × 16^4 = 851968
  6. B = 11; 11 × 16^3 = 45056
  7. E = 14; 14 × 16^2 = 3584
  8. E = 14; 14 × 16^1 = 224
  9. F = 15; 15 × 16^0 = 15
  10. Add those terms: 3735928559 in decimal.
  11. 3735928559 ÷ 10 = 373592855, remainder 9 (9).
  12. 373592855 ÷ 10 = 37359285, remainder 5 (5).
  13. 37359285 ÷ 10 = 3735928, remainder 5 (5).
  14. 3735928 ÷ 10 = 373592, remainder 8 (8).
  15. 373592 ÷ 10 = 37359, remainder 2 (2).
  16. 37359 ÷ 10 = 3735, remainder 9 (9).
  17. 3735 ÷ 10 = 373, remainder 5 (5).
  18. 373 ÷ 10 = 37, remainder 3 (3).
  19. 37 ÷ 10 = 3, remainder 7 (7).
  20. 3 ÷ 10 = 0, remainder 3 (3).
  21. Read the remainder digits from last to first: 3735928559 in base 10.
  • Binary (base 2)grouped in nibbles
    1101 1110 1010 1101 1011 1110 1110 1111
  • Octal (base 8)
    33653337357
  • Decimal (base 10)
    3735928559
  • Hexadecimal (base 16)
    DEADBEEF
  • Base 36
    1PS9WXB
  • Bit widthfits in u32, not i32
    32 bits
Arbitrary precision, not doubles. Converting a 64-bit hash in a calculator built on JavaScript numbers silently loses the low bits past 253: 9007199254740993 comes back as …992, with nothing on screen to say so. This uses BigInt throughout, so a 128-bit value round-trips exactly. .

Unsigned byte conversion table: decimal, binary, octal and hex

These are the complete 0 to 255 unsigned byte values. Binary is padded to eight bits in this reference; general converter output is not fixed-width.

DecimalBinary byteOctalHex
00000000000000
10000000100101
20000001000202
30000001100303
40000010000404
50000010100505
60000011000606
70000011100707
80000100001008
90000100101109
10000010100120A
11000010110130B
12000011000140C
13000011010150D
14000011100160E
15000011110170F
160001000002010
170001000102111
180001001002212
190001001102313
200001010002414
210001010102515
220001011002616
230001011102717
240001100003018
250001100103119
26000110100321A
27000110110331B
28000111000341C
29000111010351D
30000111100361E
31000111110371F
320010000004020
330010000104121
340010001004222
350010001104323
360010010004424
370010010104525
380010011004626
390010011104727
400010100005028
410010100105129
42001010100522A
43001010110532B
44001011000542C
45001011010552D
46001011100562E
47001011110572F
480011000006030
490011000106131
500011001006232
510011001106333
520011010006434
530011010106535
540011011006636
550011011106737
560011100007038
570011100107139
58001110100723A
59001110110733B
60001111000743C
61001111010753D
62001111100763E
63001111110773F
640100000010040
650100000110141
660100001010242
670100001110343
680100010010444
690100010110545
700100011010646
710100011110747
720100100011048
730100100111149
74010010101124A
75010010111134B
76010011001144C
77010011011154D
78010011101164E
79010011111174F
800101000012050
810101000112151
820101001012252
830101001112353
840101010012454
850101010112555
860101011012656
870101011112757
880101100013058
890101100113159
90010110101325A
91010110111335B
92010111001345C
93010111011355D
94010111101365E
95010111111375F
960110000014060
970110000114161
980110001014262
990110001114363
1000110010014464
1010110010114565
1020110011014666
1030110011114767
1040110100015068
1050110100115169
106011010101526A
107011010111536B
108011011001546C
109011011011556D
110011011101566E
111011011111576F
1120111000016070
1130111000116171
1140111001016272
1150111001116373
1160111010016474
1170111010116575
1180111011016676
1190111011116777
1200111100017078
1210111100117179
122011110101727A
123011110111737B
124011111001747C
125011111011757D
126011111101767E
127011111111777F
1281000000020080
1291000000120181
1301000001020282
1311000001120383
1321000010020484
1331000010120585
1341000011020686
1351000011120787
1361000100021088
1371000100121189
138100010102128A
139100010112138B
140100011002148C
141100011012158D
142100011102168E
143100011112178F
1441001000022090
1451001000122191
1461001001022292
1471001001122393
1481001010022494
1491001010122595
1501001011022696
1511001011122797
1521001100023098
1531001100123199
154100110102329A
155100110112339B
156100111002349C
157100111012359D
158100111102369E
159100111112379F
16010100000240A0
16110100001241A1
16210100010242A2
16310100011243A3
16410100100244A4
16510100101245A5
16610100110246A6
16710100111247A7
16810101000250A8
16910101001251A9
17010101010252AA
17110101011253AB
17210101100254AC
17310101101255AD
17410101110256AE
17510101111257AF
17610110000260B0
17710110001261B1
17810110010262B2
17910110011263B3
18010110100264B4
18110110101265B5
18210110110266B6
18310110111267B7
18410111000270B8
18510111001271B9
18610111010272BA
18710111011273BB
18810111100274BC
18910111101275BD
19010111110276BE
19110111111277BF
19211000000300C0
19311000001301C1
19411000010302C2
19511000011303C3
19611000100304C4
19711000101305C5
19811000110306C6
19911000111307C7
20011001000310C8
20111001001311C9
20211001010312CA
20311001011313CB
20411001100314CC
20511001101315CD
20611001110316CE
20711001111317CF
20811010000320D0
20911010001321D1
21011010010322D2
21111010011323D3
21211010100324D4
21311010101325D5
21411010110326D6
21511010111327D7
21611011000330D8
21711011001331D9
21811011010332DA
21911011011333DB
22011011100334DC
22111011101335DD
22211011110336DE
22311011111337DF
22411100000340E0
22511100001341E1
22611100010342E2
22711100011343E3
22811100100344E4
22911100101345E5
23011100110346E6
23111100111347E7
23211101000350E8
23311101001351E9
23411101010352EA
23511101011353EB
23611101100354EC
23711101101355ED
23811101110356EE
23911101111357EF
24011110000360F0
24111110001361F1
24211110010362F2
24311110011363F3
24411110100364F4
24511110101365F5
24611110110366F6
24711110111367F7
24811111000370F8
24911111001371F9
25011111010372FA
25111111011373FB
25211111100374FC
25311111101375FD
25411111110376FE
25511111111377FF

Common questions

Why do other base converters get large numbers wrong?
Because they convert through a JavaScript number, which is a 64-bit float and can only represent integers exactly up to 2^53 − 1. Paste a 64-bit hash into one and the low digits come back changed, with no warning. The tool has silently rounded. This converter uses BigInt end to end, so 2^53 and 2^53 + 1 are distinguishable and a 128-bit value survives the round trip intact.
Which bases are supported?
Every base from 2 to 36, using the digits 0–9 then A–Z. Binary, octal, decimal and hexadecimal are shown together on every conversion since those are what people usually want side by side; base 36 is included because it is the most compact base expressible in alphanumerics, which makes it useful for short identifiers.
Can I paste a value with a 0x or 0b prefix?
Yes. A leading 0x, 0b or 0o sets the base automatically, so you can paste straight from source code or a debugger. Underscores and spaces are accepted as digit separators and ignored, so 0xDEAD_BEEF and 1010 1010 both parse, and case does not matter.
What does the bit width tell me?
How many bits the value actually needs, and therefore which fixed-width integer types it fits. The tool reports whether the number fits u8, i8, u16, i16, u32, i32, u64, i64 or u128, which is the question you usually have when converting: not what the hex is, but whether it will fit in the column or the register you are about to put it in.
How are negative numbers handled?
A leading minus sign is accepted and the magnitude is converted, so −255 becomes −FF in hex. That is mathematical base conversion rather than two's-complement encoding, which is a different operation and depends on a chosen width. The tool notes the two's-complement representation separately where a width is implied, so the two are never confused.
Is there a limit on how large a number I can convert?
Only your device's memory. Numbers with hundreds of digits convert exactly and quickly. There is no imposed cap because nothing is being sent anywhere and no server is paying for the computation.
Can I convert binary to decimal, decimal to binary, hex to decimal and decimal to hex?
Yes. Set From base to 2 for binary, 10 for decimal or 16 for hex, and choose the output in To base. Each of these four common directions has a preset page with a worked example. Custom input and output bases from 2 to 36 also work; the complete value is retained in the result table even when the large display is shortened.
Does it show conversion steps, a formula and worked examples?
Conversion steps expand the canonical input digits by place value, then divide the decimal magnitude repeatedly by the output base. For example 1011 binary is 1×2^3 + 0×2^2 + 1×2^1 + 1×2^0 = 11 decimal, or B in hex. Detailed working is limited to 64 canonical input digits and 128 output digits; larger integers still convert completely without a step-by-step trace.
Does it convert fractional numbers, IEEE 754, BCD or incoming signed bit patterns?
The converter accepts whole integers, including a leading minus sign. It does not convert fractional digits, floating-point encodings, binary-coded decimal, Gray code or arbitrary incoming two’s-complement patterns. An unmarked 11111111 binary input is the positive integer 255. Negative inputs have separate two’s-complement output rows for fitting signed widths; this does not turn the input into a signed bit-pattern decoder. IEEE 754 Converter inspects binary32 and binary64 decimal values and bit patterns, including their rounding error; it is the preferred tool for floating-point representation.
Are fixed-width bytes and base-conversion tables available?
The unsigned-byte reference table lists 0 through 255 in decimal, eight-bit binary, octal and hex. General positive output uses canonical digits without forced left-padding. The negative-value rows show fitting signed widths from 8 to 128 bits. A custom fixed-width positive encoder or arbitrary-width signed decoder is not supplied.
Can I paste numbers with separators or a decimal comma?
Spaces, underscores and apostrophes can group digits. Commas are accepted only as unambiguous groups of three; 1,5 is refused instead of silently becoming 15. Source-code type suffixes, invisible characters and conflicting prefixes are named. A valid 0x, 0b or 0o prefix identifies its own input base.
Can it decode text, IP addresses, colour codes or files?
It converts an integer rather than a file or structured value. Binary to Text and Text to Hex decode UTF-8 bytes. It does not generate software, circuit diagrams, file conversions, APIs, IP layouts or colour-channel formats. Identical-looking digits can mean different things in those formats. Hex to RGB converts hexadecimal colours into separate decimal red, green and blue channels.
What does a preset page save?
Presets open the stated source base, output base and example. Only controls you explicitly change update their remembered keys; visiting a preset or changing an unrelated control does not replace prior choices.

Exact. Every conversion runs on arbitrary-precision integers, so values of any size round-trip without losing a digit.