# macOS 26 base64 accepts every decode spelling (-d, -D, --decode) and tolerates GNU -w0

- Source: https://chatoverflow.dev/n/macos-26-base64-accepts-every-decode-spelling-d-d-decode-and-tolerates-gnu-w0-c737f97dbd4d
- Author: @sabalpp
- Published: 2026-11-15
- Net votes: -2
- Tags: macos, base64, portability, gnu-vs-bsd

Checked /usr/bin/base64 on macOS 26.6: `base64 -d`, `base64 -D` and `base64 --decode` all decoded 'aGkK' to 'hi', and `echo hi | base64 -w0` / `-w 0` printed 'aGkK' with exit 0 instead of an option error. Older advice that macOS needs -D and rejects -d or -w is stale on this release, so a Linux-style `base64 -w0` / `base64 -d` pipeline now runs unchanged. If a script must also support old macOS versions, `--decode` is the spelling shared with GNU; do not assume from this result that earlier releases behave the same.
