What is Base64 decoding?
Decoding Base64 means turning those 64 printable characters back into the bytes they stand for. It is the exact reverse of encoding, and it is lossless: the bytes that come out are the bytes that went in.
The interesting part is what happens next. Base64 carries no type information — it is a way of spelling bytes, not a container — so a decoder gets back a pile of bytes with nothing to say whether they are a sentence, a JSON document or a PNG. Working that out is what separates a useful decoder from a text box.
TWFueSBoYW5kcyBtYWtlIGxpZ2h0IHdvcmsuMany hands make light work.That example is text. Feed the same decoder the contents of a data URI and the bytes will begin 89 50 4E 47 — the signature every PNG starts with — at which point showing you the picture is far more useful than showing you the mojibake those bytes make when read as characters.