BASENC(1)

๐Ÿ’– BASENC(1) โ€” bestie's guide to encoding/decoding ๐Ÿ’–

User Commands ยท the basenc page, but make it a group chat ๐ŸŽ€


โœจ NAME โœจ

basenc โ€” encode/decode data and print to standard output ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

basenc [OPTION]... [FILE]

โœจ DESCRIPTION โœจ

okay so basenc encodes or decodes FILE, or standard input, straight to standard output. that's the whole vibe ๐Ÿ’…

If there's no FILE, or when FILE is -, it reads standard input. classic.

Mandatory arguments to long options are mandatory for short options too. (yes bestie, that applies to you too ๐Ÿซถ)

  • --base64 โ€” literally the same as the base64(1) program (RFC4648 section 4) โœจ
  • --base64url โ€” file- and url-safe base64 (RFC4648 section 5) ๐Ÿ”ฅ
  • --base58 โ€” visually unambiguous base58 encoding ๐Ÿ‘‘ (no confusing lookalike characters, we love that)
  • --base32 โ€” same as the base32(1) program (RFC4648 section 6) ๐ŸŒธ
  • --base32hex โ€” extended hex alphabet base32 (RFC4648 section 7) ๐Ÿงš
  • --base16 โ€” hex encoding (RFC4648 section 8) โญ
  • --base2msbf โ€” bit string with most significant bit (msb) first ๐Ÿฆ‹
  • --base2lsbf โ€” bit string with least significant bit (lsb) first ๐Ÿฆ‹
  • -d, --decode โ€” decode data ๐Ÿ™ˆ
  • -i, --ignore-garbage โ€” when decoding, ignore non-alphabet characters ๐Ÿ’€ (the "girl just skip it" flag)
  • -w, --wrap=COLS โ€” wrap encoded lines after COLS character (default 76). Use 0 to disable line wrapping ๐ŸŽ€
  • --z85 โ€” ascii85-like encoding (ZeroMQ spec:32/Z85); when encoding, input length must be a multiple of 4; when decoding, input length must be a multiple of 5 โš ๏ธ (the math is mathing, respect it)
  • --help โ€” display this help and exit ๐Ÿซถ
  • --version โ€” output version information and exit โœจ
When decoding, the input may contain newlines in addition to the bytes of the formal alphabet. Use --ignore-garbage to attempt to recover from any other non-alphabet bytes in the encoded stream. ๐Ÿ’–

๐ŸŒˆ ENCODING EXAMPLES ๐ŸŒˆ

these are the examples, and honestly? iconic. keep them exactly like this, no cap:

$ printf '\376\117\202' | basenc --base64
/k+C
$ printf '\376\117\202' | basenc --base64url
_k-C
$ printf '\376\117\202' | basenc --base32
7ZHYE===
$ printf '\376\117\202' | basenc --base32hex
VP7O4===
$ printf '\376\117\202' | basenc --base16
FE4F82
$ printf '\376\117\202' | basenc --base2lsbf
011111111111001001000001
$ printf '\376\117\202' | basenc --base2msbf
111111100100111110000010
$ printf '\376\117\202\000' | basenc --z85
@.FaC

๐Ÿ’œ AUTHOR ๐Ÿ’œ

Written by Simon Josefsson and Assaf Gordon. absolute legends, honestly ๐Ÿ™Œ


๐Ÿ˜ญ REPORTING BUGS ๐Ÿ˜ญ


Copyright ยฉ 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. fr fr, no warranty bestie ๐Ÿ˜ญ

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹


and that's the page!! this one's from GNU coreutils 9.12, dated September 2026 โ€” go forth and encode, you absolute main character ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from