@kszongic/multibase-cli
v1.0.0
Published
Convert numbers between bases (bin, oct, dec, hex, base36, custom). Zero dependencies.
Maintainers
Readme
@kszongic/multibase-cli
Convert numbers between bases (bin, oct, dec, hex, base36, custom 2-36). Zero dependencies.
Install
npm i -g @kszongic/multibase-cliUsage
# Decimal to hex
multibase 255 --to hex
# ff
# Hex to binary (auto-detects 0x prefix)
multibase 0xff --to bin
# 11111111
# Show all common bases
multibase 0b11111111 --all
# bin 11111111
# oct 377
# dec 255
# hex ff
# b36 73
# Custom base
multibase 42 --to 2
# 101010
# Explicit input base
multibase ff --from hex --to bin
# 11111111
# Uppercase output
multibase 255 --to hex -u
# FFOptions
| Flag | Description |
|------|-------------|
| --from, -f <base> | Input base (2-36, or bin/oct/dec/hex) |
| --to, -t <base> | Output base (2-36, or bin/oct/dec/hex). Default: 10 |
| --all, -a | Show all common bases |
| --upper, -u | Uppercase output |
| --help, -h | Show help |
Auto-detects 0b (binary), 0o (octal), 0x (hex) prefixes.
License
MIT © 2026 kszongic
