{
    "mode": "info",
    "parameter": "basenc",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/basenc/json",
    "generated": "2026-11-14T14:40:25Z",
    "sections": {
        "File: coreutils.info,  Node: basenc invocation,  Prev: base64 invocation,  Up: Output of entire files": {
            "content": "",
            "subsections": [
                {
                    "name": "3.7 'basenc': Transform data into printable data",
                    "content": "'basenc' transforms data read from a file, or standard input, into (or\nfrom) various common encoding forms.  The encoded form uses printable\nASCII characters to represent binary data.\n\nSynopses:\n\nbasenc ENCODING [OPTION]... [FILE]\nbasenc ENCODING --decode [OPTION]... [FILE]\n\nThe ENCODING argument is required.  If FILE is omitted, 'basenc'\nreads from standard input.  The '-w/--wrap','-i/--ignore-garbage',\n'-d/--decode' options of this command are precisely the same as for\n'base64'.  *Note base64 invocation::.\n\nSupported ENCODINGs are:\n\n'--base64'\nEncode into (or decode from with '-d/--decode') base64 form.  The\nformat conforms to RFC 4648#4\n(https://tools.ietf.org/search/rfc4648#section-4).  Equivalent to\nthe 'base64' command.\n\n'--base64url'\nEncode into (or decode from with '-d/--decode') file-and-url-safe\nbase64 form (using '' and '-' instead of '+' and '/').  The format\nconforms to RFC 4648#5\n(https://tools.ietf.org/search/rfc4648#section-5).\n\n'--base32'\nEncode into (or decode from with '-d/--decode') base32 form.  The\nencoded data uses the 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567='\ncharacters.  The format conforms to RFC 4648#6\n(https://tools.ietf.org/search/rfc4648#section-6).  Equivalent to\nthe 'base32' command.\n\n'--base32hex'\nEncode into (or decode from with '-d/--decode') Extended Hex\nAlphabet base32 form.  The encoded data uses the\n'0123456789ABCDEFGHIJKLMNOPQRSTUV=' characters.  The format\nconforms to RFC 4648#7\n(https://tools.ietf.org/search/rfc4648#section-7).\n\n'--base16'\nEncode into (or decode from with '-d/--decode') base16\n(hexadecimal) form.  The encoded data uses the '0123456789ABCDEF'\ncharacters.  The format conforms to RFC 4648#8\n(https://tools.ietf.org/search/rfc4648#section-8).\n\n'--base2lsbf'\nEncode into (or decode from with '-d/--decode') binary string form\n('0' and '1') with the least significant bit of every byte first.\n\n'--base2msbf'\nEncode into (or decode from with '-d/--decode') binary string form\n('0' and '1') with the most significant bit of every byte first.\n\n'--z85'\nEncode into (or decode from with '-d/--decode') Z85 form (a\nmodified Ascii85 form).  The encoded data uses the\n'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU VWXYZ.-:+=^!/*?&<>()[]{}@%$#'.\ncharacters.  The format conforms to ZeroMQ spec:32/Z85\n(https://rfc.zeromq.org/spec:32/Z85/).\n\nWhen encoding with '--z85', input length must be a multiple of 4;\nwhen decoding with '--z85', input length must be a multiple of 5.\n\nEncoding/decoding examples:\n\n$ printf '\\376\\117\\202' | basenc --base64\n/k+C\n\n$ printf '\\376\\117\\202' | basenc --base64url\nk-C\n\n$ printf '\\376\\117\\202' | basenc --base32\n7ZHYE===\n\n$ printf '\\376\\117\\202' | basenc --base32hex\nVP7O4===\n\n$ printf '\\376\\117\\202' | basenc --base16\nFE4F82\n\n$ printf '\\376\\117\\202' | basenc --base2lsbf\n011111111111001001000001\n\n$ printf '\\376\\117\\202' | basenc --base2msbf\n111111100100111110000010\n\n$ printf '\\376\\117\\202\\000' | basenc --z85\n@.FaC\n\n$ printf 01010100 | basenc --base2msbf --decode\nT\n\n$ printf 01010100 | basenc --base2lsbf --decode\n*\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}