Base64 encoder/decoder: questions and guides
Each guide here answers one question with a practical example, then takes you to the tool to try it yourself. Guides: 7.
Questions
- What is Base64?What Base64 is and why systems use it, how to encode or decode Arabic text, and why it never protects passwords.
- A courier's JSON response contains the shipping label as a long Base64 string. How do I turn it back into a file I can open?Paste the Base64 value from a courier's response into the decoder. It recognises the file type from its signature (PNG, JPEG, PDF and more) and lets you download it.
- Encoding an Arabic word to Base64 with another tool gave an error, or odd symbols when decoded. Why?The old btoa shortcut treats each character as one byte, so it fails on Arabic or garbles it. Correct Base64 goes through UTF-8 bytes first, which is why it is longer.
- My developer sent me a JWT access token for a store integration. Can I read it here, and does decoding it mean it is genuine?The middle part of a JWT is URL-safe Base64 without padding, and the tool decodes it to JSON. Decoding does not check the signature, and the token is a secret.
- The Base64 I copied from an email is split across many lines. Do I need to remove the line breaks before decoding?Line breaks and spaces are not part of the Base64 alphabet, so the tool skips them, tells you how many, and decodes the rest. A > quote marker is still refused.
- I am putting a Base64 value inside a link. Should I choose the URL-safe alphabet, drop the = signs, or both?Standard Base64 can contain + and /, which mean something in a URL, so the URL-safe alphabet uses - and _ instead. Dropping = is optional. A real example.
- I decoded Base64 from a message and got an error saying the number of symbols cannot come from a correct encoding. Is the text cut off?Base64 comes in groups of 4 symbols, and one leftover symbol cannot come from a valid encoding, so the tool refuses it. What that means, and how it differs from padding.
