Encode and decode Base64 and data: URIs — text or files, all local, nothing leaves your browser.
··
Not valid UTF-8 text — use Download to save the decoded bytes as a file.
How the Base64 / Data URI Tool works
Everything runs locally in your browser — nothing you type or drop here is ever sent anywhere.
Encode. Type or paste text, or drop a file onto the dropzone (or click it to choose one). A selected file always wins over typed text. Four outputs update live: Base64, Base64URL (the URL/filename-safe variant, unpadded), a data: URI, and a ready-to-use JS snippet that turns that data URI back into a Blob.
MIME type. The text field above the outputs sets the MIME type used in the data URI when encoding typed text. It's ignored (and disabled) while a file is selected — the file's own type is used instead.
Decode. Paste Base64, Base64URL, or a full data: URI. If the decoded bytes are valid UTF-8 text, they're shown directly; otherwise you'll see a note that it's binary data, with a Download as file button to save the exact bytes.
Copy buttons (📋). Each field has its own copy-to-clipboard button tucked into its top-right corner — it briefly turns into a checkmark to confirm the copy. Output fields always show it; editable fields reveal it once they contain something.
Your current mode and typed text are remembered on this device (not any selected file), so reopening the tool picks up where you left off.