- Base64 encoding
- An encoding scheme that converts arbitrary binary data into a string of 64 printable ASCII characters by mapping every 3-byte group to 4 characters. It adds approximately 33% overhead compared to the raw binary, making it larger but safe to embed in text-based formats like HTML, CSS, JSON, and XML.
- Data URL / data URI
- A URI scheme defined by RFC 2397 that embeds file content directly in a URL string instead of referencing an external file location. The format is data:[<mediatype>][;base64],<data>. Browsers interpret data URLs as in-memory files, allowing images and other media to be embedded inline in CSS, HTML, or JavaScript.
- MIME type
- A standardised two-part label (type/subtype) identifying a file's format, such as image/png, image/jpeg, or image/svg+xml. In a data URL, the MIME type tells the browser how to decode and render the embedded data. The wrong MIME type causes display failures even if the base64 data itself is correct.
- RFC 2397
- The Internet standard that defines the data URL scheme. Published in 1998, it specifies the syntax data:[<mediatype>][;base64],<data>, the handling of MIME types and character encoding, and the optional ;base64 flag that indicates the data portion is base64-encoded rather than URL-encoded.
- Encoding overhead
- The additional size introduced by base64 encoding compared to the original binary. Since base64 represents 3 bytes as 4 characters, the encoded string is always approximately 33% larger than the source binary. This overhead is a fixed property of the encoding scheme and cannot be reduced.
- Inline asset
- A resource (image, font, script) whose content is embedded directly in the document rather than loaded from a separate URL. Inline assets eliminate the HTTP request and potential latency of fetching the resource, but cannot be independently cached by the browser, making them suitable only for small, non-reused resources.