Embedding a small icon or font in CSS
A data URI removes a request. Worth it below roughly 4 KB; beyond that a separate cacheable file wins because the inlined copy is re-downloaded with every stylesheet.
Encodes a local file to Base64, or decodes Base64 into a file, entirely in your browser.
Encodes a local file to Base64, or decodes Base64 into a file, entirely in your browser.
A 10 KB PNG file
iVBORw0KGgo... (Base64 text)
Base64 grows the file by ~33%.
Output size ≈ input size × 4/3, rounded up.
Your input is processed entirely in your browser and never sent to a YAS server.
API automation is not supported for this tool. Requires the browser File API — files are processed locally and never uploaded. This tool intentionally cannot be executed through the YAS API (server-side).
This tool runs in your browser and cannot be executed through the YAS API. Requires the browser File API — files are processed locally and never uploaded.
The file is read as raw bytes through the FileReader API and encoded directly, without a text-decoding step. That distinction is what separates this from the text tool: interpreting a PNG or a PDF as UTF-8 first would corrupt it, because arbitrary byte sequences are not valid text in any encoding. Encoding operates on the exact bytes on disk.
The practical output is usually a data URI: data:<mime-type>;base64,<payload>. The MIME type is taken from the file and matters — a browser renders data:image/png differently from data:application/octet-stream, and an incorrect type can cause the content to download rather than display, or be refused outright by a strict Content-Security-Policy.
A data URI removes a request. Worth it below roughly 4 KB; beyond that a separate cacheable file wins because the inlined copy is re-downloaded with every stylesheet.
Endpoints that accept documents as a JSON string field need the file Base64-encoded, since JSON strings cannot carry raw bytes.
Some clients accept data URIs, though many block them — test before relying on it, and keep a hosted fallback.
Chat, YAML config, environment variables and shell scripts all need bytes represented as text.
What this tool deliberately does not do, and where it will disagree with other implementations.