If I run the command echo 1234 | base64
, I get back MTIzNAo=
. If I input the same string into other encoders (base64encode.org for example), I get different MTIzNA==
.
I see a similar pattern with the differences between encoders. Both outputs seem to very similar, but the last or second to last character has differences.
echo 12345678 | base64
outputs MTIzNDU2NzgK
, but on base64encode.org I get MTIzNDU2Nzg=
NodeJS's Buffer encoder to base64 also gives the same output as base64encode.org's encoder, so I'm assuming that something isn't right with how I'm using the base64
command in Linux.
What's the difference?