Décoder Base64 text and handle missing or corrupted padding
Décoder Base64 payloads that arrive without trailing '=' padding or with URL-safe alphabet, and recover the original bytes safely.
- 1
Base64 encodes every 3 bytes into 4 characters; when the input length is not a multiple of 3, padding '=' characters are added. Some APIs strip the padding or swap +/ for -_ (URL-safe alphabet). Decoding must restore both before processing.
- 2 Décodeur Base64 →
Paste the Base64 string. If padding is missing the decoder auto-restores it; if the alphabet is URL-safe (- and _), toggle the variant option.
- 3 base64-encode → base64-decode
Run the round-trip chain to confirm your decode output re-encodes to the same input — this catches silent corruption from wrong alphabets.
- 4
If the decoded bytes look like binary (not text), switch the output mode to hex or save to file via the base64-to-file tool to inspect the raw bytes.
Questions fréquentes
- Why does my decoded text contain replacement characters?
- The decoded bytes are likely not UTF-8 text. Try interpreting as Latin-1, or treat the output as binary and save to a file to inspect its actual content.
- What is the difference between standard and URL-safe Base64?
- Standard uses + and / with = padding; URL-safe replaces + with - and / with _, and often omits padding. Both encode the same bytes — only the alphabet differs.