Before using Base64 for a larger job, encode a harmless sample containing ordinary text, a non-ASCII character, and a line break. Decode it independently and compare exact bytes. Then try the form expected by the receiving system: standard, URL-safe, padded, or data-URL. If the output fails, fix the format before processing real content. Avoid using private tokens as test cases, since encoded values remain readable to anyone who receives them.