How-to guide

How to convert decimal to binary or hex

Press ⌘K with TabCmdr and type 255 to binary or 255 to hex. To go back, type the number with its prefix: 0xff to decimal gives 255. Enter copies it.

Quick answer

Convert a number in three steps

  1. ⌘K

    Step 1

    Open the palette

    Ctrl+K on Windows and Linux. Works on any page.

  2. 255 to binary

    Step 2

    Type the number and base

    The answer shows at the top of the list.

  3. ↵

    Step 3

    Press Enter

    The answer is copied, ready to paste.

Chrome's way

Use Google Search’s calculator

Google lists base conversion among the things its search calculator can do. Type the conversion into the search box on google.com.

You can search from Chrome’s address bar too. If Google is your default search engine, type the conversion there and press Enter. In some countries Google is Chrome’s default, and in others Chrome asks you to pick one.

Sources: Google’s calculator and unit converter and default search engine help pages, checked in October 2026.

TabCmdr's way

Convert numbers in the TabCmdr palette

TabCmdr is a keyboard launcher that lives in your browser. Its search box converts between decimal, hexadecimal, binary and octal as you type.

Before you start: add TabCmdr from the Chrome Web Store. It has a 7-day free trial and needs no account.

Step 1: Open the palette

Press ⌘+K on a Mac or Ctrl+K on Windows and Linux, on any page.

Step 2: Type the number and the base you want

Type a number, to, and the base: hex, binary, octal or decimal. The short forms bin, oct and dec work too. The answer shows under Calculator at the top of the list.

TabCmdr palette with 255 to binary typed and the answer 0b11111111 under Calculator
255 to binary gives 0b11111111.

The answer starts with a prefix that names its base: 0x for hex, 0b for binary and 0o for octal.

Step 3: Press Enter to copy

The answer row is already highlighted. Press Enter and TabCmdr copies it and closes the palette. For 255 to binary, a “Copied 0b11111111” message shows at the bottom of the page.

Convert back to decimal

To turn a hex, binary or octal number into decimal, type it with its prefix, then to decimal:

TabCmdr palette with 0xff to decimal typed and the answer 255 under Calculator
0xff to decimal gives 255.
You typeYou get
255 to hex0xff
42 in hex0x2a
64 to octal0o100
0xff to binary0b11111111
0b1010 to decimal10
0o17 to decimal15
1010 bin to decimal10
ff to decimal255
deadbeef to decimal3735928559

No prefix? Name the base after the number instead, like 1010 bin. A number made only of digits is read as decimal, and one with the letters a to f in it, like ff, is read as hex.

If no answer shows up

  • The number has a decimal point. Only whole numbers convert, so 1.5 to binary gives no answer.
  • The digits don’t fit the base. Binary only uses 0 and 1, and octal only uses 0 to 7, so 0b102 to decimal and 0o89 to decimal give no answer.
  • You wanted a color. A HEX color like #1a73e8 converts with to rgb. The color conversion page covers colors.

Try it on your own tabs

Works in Chrome, Edge, Brave, Arc, Vivaldi and Opera.

Install for Chrome

FAQ

Questions about number bases

More in the documentation.

How do I convert decimal to binary?

Type the number and to binary, like 255 to binary. The answer, 0b11111111, shows at the top of the list, and Enter copies it.

Why does the answer start with 0x, 0b or 0o?

Those prefixes mark the base: 0x for hexadecimal, 0b for binary and 0o for octal. You can type them back in, so 0xff to decimal gives 255.

Does it handle negative or very large numbers?

Yes. A minus sign is kept, so -10 to hex gives -0xa. Large whole numbers stay exact: 18446744073709551615 to hex gives 0xffffffffffffffff.

Can I convert numbers with a decimal point?

No. Base conversion works on whole numbers, so 1.5 to binary gives no answer.

One shortcut for your whole browser. Stop hunting for tabs.

Free for 7 days Then $3.99 / y No account