Base64 Encode

Encode text to Base64 format. Support various character sets, URL-safe encoding, and MIME-compatible line chunking.

Max 2 MB
File don pass 2 MB limit. Text don pass 2 MB limit. Preview: dem dey show first 500 KB of {0} MB file. Dem go send the full content for formatting.
Abeg provide text to process.
Change this if you want to convert the data to another character set before encoding.
Prior to encoding, line breaks go be replaced with the selected separator.

Base64 Encoding Explained


Why I need Base64 encoding?

Base64 na encoding scheme used to represent binary data in ASCII format. E dey useful when binary data needs to be transmitted over media wey designed to handle text.

How Base64 encoding dey work?

Bytes wey form the data dey broken into buffers of 24 bits (3 bytes at a time). The resulting buffer na then broken into four 6-bit groups, each translated into a character in the Base64 alphabet.

How I fit embed Base64 encoded resource for HTML, XML, and CSS?

Listed below na examples of how to embed Base64 resources within different web documents.

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

XML image embedding:
<image>data:image/jpeg;base64,/9j/4AAQ...</image>

CSS image embedding:
.cls { background-image: url('data:image/jpeg;base64,/9j/4AAQ...'); }