Convert images and files to Base64
The Base64 converter turns images and files into a Base64 string and back again. Base64 encodes binary data as plain text, which makes it usable anywhere only characters are allowed – for example directly inside CSS, HTML or JSON. The tool is aimed at web developers and designers and works entirely in your browser, without uploading your files.
Common use cases
- Embed images inline: Place small icons or logos as a data URI directly in CSS or HTML and save an extra HTTP request.
- Transport data in JSON: Wrap binary content as Base64 to send it safely through APIs or inside configuration files.
- Email and attachments: Understand and inspect how attachments are encoded in email, or create embedded images for HTML mail.
- SVGs and fonts: Encode small SVG graphics or web fonts as a data URI to include them without a separate file.
How to convert to Base64
- 1 Drag and drop an image, paste it from the clipboard or import it from a URL.
- 2 The tool instantly produces the Base64 string or the ready-to-use data URI.
- 3 Copy the result into your code with one click.
- 4 To go the other way, paste a Base64 string to decode it back into an image.
When Base64 is worth it
Base64 is ideal for very small, frequently used assets because an embedded image loads without a separate request. Keep in mind, however, that encoding increases the data size by roughly a third, so large images are usually better served as an external file. Because the conversion happens locally, the tool is also suitable for confidential files that should never leave your computer. For images that change often, a normal cached image file remains the more efficient solution.