Base64 Decoder & Encoder

 

Base64 Decoder & Encoder

Select file/image:
Or paste data here:

 

URL decoder/encoder ►

 

Text to base64 encoding example

Text input:

The text input is first encoded as binary bit stream of ASCII codes of each character.

Each 6 bits of the bit stream are encoded to base64 digit.

Encoded base64 text string output:

 

Image to base64 encoding example

Image input:

flower.jpg

Image data URI scheme with base64 encoded data output:

 

data:image/jpeg;base64, is the data URI scheme header.

 

/9j/4AAQSkZ... is the encoded base64 data.

 

HTML <img> with base64 data URI

<img src="data:image/jpeg;base64,/9j/4AAQSkZ...">

 

CSS background with base64 data URI

body {
    background-image: url('data:image/jpeg;base64,/9j/4AAQSkZ...');
}

 

URL decoder/encoder ►

 

See also