convert-base
Convert any number of any size, to and from any base.
Convert any regular positional-notation number, of any size - positive, negative, or fractional - to and from any numeric base.
It also encodes and decodes streaming binary to text across far more bases than the standard tools offer, and on average faster than basenc.
A single, fast, cross-platform static binary written in Go, with no runtime or dependencies to install.
Highlights
- Any number, any base. All the usual standards are built in - base 10, base 16, RFC 4648 base 32 and 64 - plus more than sixty predefined named bases.
- Bring your own alphabet: define a base on the spot by listing its symbols.
- Negatives and fractions work in nearly every base, and the sign and radix markers are configurable for bases that use those symbols themselves.
- Binary to text in every power-of-two base from 2 to 256, plus 2048, 32768, and 65536, and the chunked codecs base45, Ascii85, Z85, and base91.
- Bases with no byte-exact mapping are refused in binary mode rather than silently mangling the input.
- Reads from the command line or from stdin, so it drops straight into a pipe.