Text

Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal.

How to use it

  1. Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type Base Converter and press Return.
  2. Paste or type your text into Input.
  3. Adjust the Options on the right if you need to. The defaults are listed below.
  4. Press Convert, or ⌘↵.
  5. Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.

Options

OptionValuesDefault
Input baseBase of input numberAuto-detect, Binary (2), Octal (8), Decimal (10), Hexadecimal (16), CustomAuto-detect
Custom baseCustom base (2-36)2–3610
Show prefixesShow 0b, 0o, 0x prefixesOn or offOn
Group digitsAdd separators for readabilityOn or offOn
Uppercase hexUse uppercase letters for hexOn or offOn

Example

Real output from Devly, with the default options.

Input
255
Decimal (10)
255
Binary (2)
0b1111 1111
Octal (8)
0o377
Hexadecimal (16)
0xFF
Bits required
8
Detected input base
Decimal (auto)

From Terminal

With the free command-line tool installed:

Terminal
devly numberbase "255"
# or pipe text in
pbpaste | devly numberbase

Quick Switch also finds it by: number, base, binary, hex, hexadecimal, octal, decimal, radix.

More Text tools