Tested tool guide
Tested browser tools
Checked August 16, 2026
What Data URI Generator does, with a checked example
A data URI inlines a file's bytes into a URL: the `data:[mediatype][;base64],<payload>` scheme lets an `<img>` src or a CSS `url()` carry an image, font, or stylesheet with no separate file and no network request. This tool converts files into that form and converts URIs back into files. Encoding reads the file, base64-encodes its bytes, and prepends a MIME type guessed from the filename; decoding reverses each step. The surprise for most users: the result is bigger than the source, roughly a third larger for base64, before the prefix and mediatype add anything.
Worked example
A concrete input and expected output from the current implementation.
Input
A text file named hello.txt containing: Hello, world!
->
Expected output
data:text/plain;base64,SGVsbG8sIHdvcmxkIQ==
The 13 bytes of "Hello, world!" encode as 18 base64 characters: each three-byte group becomes four characters, and the single leftover byte yields two characters plus == padding. The tool prepends data:text/plain;base64,, using text/plain as the MIME type inferred from the .txt extension.