---
title: Number Base Converter — Hex, Decimal, Binary, Octal, Base58
url: https://varstatt.com/toolkit/base
description: Convert numbers between binary, octal, decimal, hex and base58. Any size, in your browser.
section: Developer Toolkit (https://varstatt.com/toolkit)
tags: encoding
related: Base64 (https://varstatt.com/toolkit/base64), Number base (https://varstatt.com/toolkit/base), Hash (https://varstatt.com/toolkit/hash)
---
# Number Base Converter

Convert numbers between binary, octal, decimal, hex and base58. Any size, in your browser.

## How It Works

1. **Type a number** — Enter it in any of the five bases. Prefixes 0x, 0b and 0o are understood, and spaces and underscores are ignored.
2. **Say which base it is in** — Pick binary, octal, decimal, hex or base58 under the field. A prefix such as 0xFF overrides the pick.
3. **Copy the base you need** — The number appears in all five bases at once, each with its own copy button.

## FAQ

### How do I convert hex to decimal?

Type the hex value, such as ff or 0xFF, and pick Hex. The Decimal row shows 255. Going the other way, type 255, pick Decimal, and read the Hex row.

### How large a number can it handle?

Any size. The conversion uses arbitrary-precision integers, so a 256-bit hash value or a 64-bit ID converts exactly, with no rounding.

### Does it convert fractions or decimals?

No. It converts whole numbers, positive or negative. 3.14 is not a valid input.

### What is the base58 row?

The number written with the Bitcoin base58 alphabet (no 0, O, I or l). It converts the number as an integer. A base58 string that encodes raw bytes, such as a Bitcoin address, also counts leading zero bytes as leading 1 characters, which an integer conversion does not keep.

### Is anything sent to a server?

No. The conversion runs in your browser. To turn text rather than numbers into another encoding, use the [Base64 encoder](https://varstatt.com/toolkit/base64).

## Usage

This tool runs entirely in the browser — visit the URL above to use it.

Prefill inputs via URL parameters:

- `https://varstatt.com/toolkit/base?input=...&from=...`

## Related Tools

- [Base64](https://varstatt.com/toolkit/base64)
- [Number base](https://varstatt.com/toolkit/base)
- [Hash](https://varstatt.com/toolkit/hash)
