Data URI
Drop a file and get a data URI, with the size cost of base64 shown before you commit to it.
Nothing leaves the browser. The file is read with FileReader, encoded here, and never uploaded anywhere.
A data URI carries the file inside the document, which saves a request and costs about a third more bytes — worth it for an icon, rarely worth it past a few tens of kilobytes. This panel stops at 2.00 MB.
Inlining a small icon or font as a data URI removes a request, which is worth doing right up until it is not. Base64 adds about a third to the size, and past a few kilobytes you have traded a cached request for bytes on every page load.
Drop a file and you get the encoded string with the correct MIME type, the original and encoded sizes, and the percentage added. It handles images, fonts and anything else, and the file never leaves the machine.
What people open it for
- Inlining a small SVG or icon into CSS
- Embedding an image in a single-file HTML document
- Checking whether base64 overhead makes inlining worthwhile
In the terminal
tools dataurl
Every utility is also a command in the desktop's shell.