Skip to content

Encoding converters

Data URL to Base64

Convert a data URL to plain Base64 online: paste data:image/png;base64,… and get the bare payload, the detected MIME type and the decoded file preview. Free, instant and fully private.

100% private · everything runs in your browser

Strip a data URL back down to plain Base64 — or load a file and build one. Paste data:image/png;base64,… (any MIME type) and the payload is decoded, verified against the claimed type, previewed when possible and re-emitted as clean, canonical Base64.

Input

How to use

Data URL to Base64, step by step

  1. 01

    Paste a data:…;base64,… URL — copied from HTML, CSS, an email template or a config file. Or drop a file to encode it.

  2. 02

    The tool parses the MIME type from the URI, decodes the payload and checks what the bytes actually are — the result card shows both, so mislabeled URIs are caught.

  3. 03

    Copy the canonical Base64, preview the payload when it is an image or PDF, or download the decoded file.

FAQ

Frequently asked questions

The payload is re-encoded from its decoded bytes with standard padding — so whitespace, missing padding and URL-safe alphabet variants in the original URI are normalized away. Different-looking URIs that carry the same bytes produce identical output here.

It compares the type declared in the URI with what the bytes’ signatures say. A data:image/png URI containing JPEG bytes gets flagged — useful, because browsers render by sniffing, but strict parsers, validators and some email clients do not.

Not yet — those URIs (without the ;base64 marker) use percent-encoding for text. The tool tells you clearly when it meets one instead of producing garbage.

APIs, databases and JWT-style tokens want the raw Base64 payload. Data URLs are for browsers; everything else wants the bare value — this tool is the bridge.

Yes, within your device memory — parsing, decoding and re-encoding are all local. Very large embedded assets (multi-megabyte) work, though the textarea itself gets unwieldy.

No. The whole round-trip — parse, decode, verify, re-encode — happens in your browser. Embedded tokens and signatures stay on your machine.

Related tools

esc

Tools

Pages

↑↓ navigate↵ open⌘K

Keyboard shortcuts

Same shortcuts everywhere — ⌘ on macOS, Ctrl on Windows and Linux.