{
    "content": [
        {
            "type": "text",
            "text": "# base64 (man)\n\n## NAME\n\nbase64 - base64 encode/decode data and print to standard output\n\n## SYNOPSIS\n\nbase64 [OPTION]... [FILE]\n\n## DESCRIPTION\n\nBase64 encode or decode FILE, or standard input, to standard output.\n\n## TLDR\n\n> Encode or decode file or `stdin` to/from base64, to `stdout`.\n\n- Encode a file:\n  `base64 {{path/to/file}}`\n- Wrap encoded output at a specific width (`0` disables wrapping):\n  `base64 {{-w|--wrap}} {{0|76|...}} {{path/to/file}}`\n- Decode a file:\n  `base64 {{-d|--decode}} {{path/to/file}}`\n- Encode from `stdin`:\n  `{{command}} | base64`\n- Decode from `stdin`:\n  `{{command}} | base64 {{-d|--decode}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (4 subsections)\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "base64",
        "section": "",
        "mode": "man",
        "summary": "base64 - base64 encode/decode data and print to standard output",
        "synopsis": "base64 [OPTION]... [FILE]",
        "tldr_summary": "Encode or decode file or `stdin` to/from base64, to `stdout`.",
        "tldr_examples": [
            {
                "description": "Encode a file",
                "command": "base64 {{path/to/file}}"
            },
            {
                "description": "Wrap encoded output at a specific width (`0` disables wrapping)",
                "command": "base64 {{-w|--wrap}} {{0|76|...}} {{path/to/file}}"
            },
            {
                "description": "Decode a file",
                "command": "base64 {{-d|--decode}} {{path/to/file}}"
            },
            {
                "description": "Encode from `stdin`",
                "command": "{{command}} | base64"
            },
            {
                "description": "Decode from `stdin`",
                "command": "{{command}} | base64 {{-d|--decode}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-d",
                "long": "--decode",
                "arg": null,
                "description": "decode data"
            },
            {
                "flag": "-i",
                "long": "--ignore-garbage",
                "arg": null,
                "description": "when decoding, ignore non-alphabet characters"
            },
            {
                "flag": "-w",
                "long": "--wrap",
                "arg": null,
                "description": "wrap encoded lines after COLS character (default 76). Use 0 to disable line wrapping --help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit The data are encoded as described for the base64 alphabet in RFC 4648. When decoding, the input may contain newlines in addition to the bytes of the formal base64 alphabet. Use --ig‐‐ nore-garbage to attempt to recover from any other non-alphabet bytes in the encoded stream."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": [
                    {
                        "name": "-d --decode",
                        "lines": 2,
                        "flag": "-d",
                        "long": "--decode"
                    },
                    {
                        "name": "-i --ignore-garbage",
                        "lines": 2,
                        "flag": "-i",
                        "long": "--ignore-garbage"
                    },
                    {
                        "name": "-w --wrap",
                        "lines": 4,
                        "flag": "-w",
                        "long": "--wrap"
                    },
                    {
                        "name": "--version",
                        "lines": 6,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "base64 - base64 encode/decode data and print to standard output\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "base64 [OPTION]... [FILE]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Base64 encode or decode FILE, or standard input, to standard output.\n\nWith no FILE, or when FILE is -, read standard input.\n\nMandatory arguments to long options are mandatory for short options too.\n",
                "subsections": [
                    {
                        "name": "-d --decode",
                        "content": "decode data\n",
                        "flag": "-d",
                        "long": "--decode"
                    },
                    {
                        "name": "-i --ignore-garbage",
                        "content": "when decoding, ignore non-alphabet characters\n",
                        "flag": "-i",
                        "long": "--ignore-garbage"
                    },
                    {
                        "name": "-w --wrap",
                        "content": "wrap encoded lines after COLS character (default 76).  Use 0 to disable line wrapping\n\n--help display this help and exit\n",
                        "flag": "-w",
                        "long": "--wrap"
                    },
                    {
                        "name": "--version",
                        "content": "output version information and exit\n\nThe  data  are  encoded as described for the base64 alphabet in RFC 4648.  When decoding, the\ninput may contain newlines in addition to the bytes of the formal base64 alphabet.  Use --ig‐‐\nnore-garbage to attempt to recover from any other non-alphabet bytes in the encoded stream.\n",
                        "long": "--version"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written by Simon Josefsson.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright  ©  2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later\n<https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to\nthe extent permitted by law.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Full documentation <https://www.gnu.org/software/coreutils/base64>\nor available locally via: info '(coreutils) base64 invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                   BASE64(1)",
                "subsections": []
            }
        }
    }
}