For decoding:
echo -n "bXkgc3RyaW5n" | base64 -D
# output
my string
For encoding just drop the flag:
echo -n "my string" | base64
# output
bXkgc3RyaW5n
For decoding:
echo -n "bXkgc3RyaW5n" | base64 -D
# output
my string
For encoding just drop the flag:
echo -n "my string" | base64
# output
bXkgc3RyaW5n