Encode or decode Base64. Text or files.
Base64 turns binary data into a plain-text string built from 64 safe characters, which is why you see it everywhere: data URLs in CSS, attachments in email, basic auth headers, and binary blobs stuffed into JSON. This free Base64 encoder and decoder converts in both directions, handles full UTF-8 text correctly (accents, emoji, and non-Latin scripts survive the round trip), and works on files up to 5 MB as well as text.
The conversion runs entirely in your browser using the native encoding APIs, so whatever you paste or upload never leaves your machine. That matters because Base64 strings often contain credentials, tokens, or private documents — pasting them into a tool that ships them to a server defeats the point.
In file mode you can encode an image, PDF, or any other file and optionally prepend the data URL prefix (data:mime;base64,...) so the result drops straight into an img tag or CSS background. Going the other way, paste a Base64 string, set a filename and MIME type, and download the decoded bytes as a real file. It is the quickest way to recover an attachment from a raw API payload or inspect what a mystery Base64 blob actually contains.
Use the first set of tabs to pick the direction: Encode turns text or a file into Base64, Decode turns Base64 back into the original data.
The second set of tabs switches the input type. Text mode converts as you type; File mode accepts uploads up to 5 MB.
Paste text or Base64 into the input box, or choose a file from disk. For file encoding, tick Include data URL prefix if you want a ready-to-use data URL.
Use Copy to grab the converted text. When decoding to a file, set the Filename and MIME type, then click Download file to save the decoded bytes.
No. Base64 is an encoding, not encryption — anyone can decode it instantly with no key. Never use Base64 to protect secrets; it only makes binary data safe to transmit as text.
Usually the original data was not text, or it was text in an encoding other than UTF-8. This tool decodes text as UTF-8; if the data is actually a file, switch to File mode and download the bytes instead.
Base64 output is roughly 33 percent larger than the input, because every 3 bytes of data become 4 encoded characters plus possible padding.
A data URL embeds a file directly in a string, in the form data:mime/type;base64,XXXX. Browsers can render it inline, so it is commonly used for small images in CSS or HTML without a separate HTTP request.
Yes. Encoding and decoding happen entirely in your browser with the built-in btoa and atob APIs, and neither your text nor your files are uploaded anywhere.
Base64URL replaces + with - and / with _ so the string is safe inside URLs and filenames, and usually drops the = padding. JWTs use Base64URL, which is why a standard decoder can choke on them without preprocessing.
ReSlug short links handle all encoding transparently. No more wrestling with Base64 in query strings.