Byte Array to Base64 Converter
Convert a byte array to Base64 or URL-safe Base64, and decode Base64 back to a byte array in decimal, hex or code form.
Switch between raw bytes and Base64 in either direction - useful when an API, a JWT or a config file carries binary data as text.
More Byte Array Tools
View all 17Base64 makes data about a third larger - it is an encoding for transport, not compression or encryption.
What Is the Byte Array to Base64 Converter?
Base64 writes binary data using only letters, digits, + and /, so it can travel through JSON, email, URLs and config files. This tool converts a byte array to Base64 and Base64 back to a byte array, including the URL-safe variant used by JWTs and many web APIs.
When to Use It
- An API expects a file or a key as Base64 and you have the raw bytes.
- You received Base64 and need the bytes as an array for code or a test.
- Checking a URL-safe Base64 value (with
-and_) from a token.
How to Use It
- Choose the direction: Byte Array → Base64 or Base64 → Byte Array.
- Paste the input. Switching direction feeds the current result back in, so you can round-trip.
- For encoding, tick URL-safe if needed; for decoding, choose the array format.
Example
The bytes 0x42, 0x79, 0x74, 0x65, 0x61, 0x72, 0x79, 0xFB, 0xFF encode to Qnl0ZWFyefv_ in URL-safe Base64 - the standard form would be Qnl0ZWFyefv/. Nine bytes make exactly twelve characters, so no = padding is needed.
Understanding the Output
Every 3 bytes become 4 Base64 characters, so Base64 is about 33% larger than the data. When the length is not a multiple of 3, standard Base64 adds one or two = signs; URL-safe Base64 usually drops them.
Limitations
Base64 is an encoding, not encryption - anyone can decode it. To encode or decode text rather than bytes, the Base64 Encoder / Decoder is simpler; for images, use Image to Base64.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.