Skip to main content
What you enter is never sent to a server. It is processed entirely in your browser and not stored anywhere.

Base64 Encoder & Decoder

Convert text to Base64 and back, with accents, emoji and every other character encoded as proper UTF-8. You can also turn a file into Base64 or a data URI, or rebuild a file from Base64. Nothing you type or choose is sent to a server — it is processed in your browser.

Type or paste something and the result appears here instantly.

The decoded data is not UTF-8 text; it looks like a file. Detected type:

      
    

File → Base64 · data URI

Base64 → file

What is Base64?

Base64 (RFC 4648) represents any binary data using 64 safe characters: A–Z, a–z, 0–9, + and /. Every 3 bytes become 4 characters, so the output is about 33% larger, and = pads the end to a multiple of four. It is an encoding, not encryption — anyone can decode it, so never use it to hide passwords.

You meet it in email attachments (MIME), HTTP Basic auth headers (user:pass → dXNlcjpwYXNz), JWTs, data URIs that inline images in HTML or CSS, and binary fields inside JSON. Decoded a JWT payload? Pretty-print it with the JSON formatter.

Why accents and emoji break — and how UTF-8 fixes it

Base64 encodes bytes, not characters. The same word gives different Base64 depending on which character encoding turned it into bytes:

TextEncodingBase64
caféUTF-8 (this tool, the web standard)Y2Fmw6k=
caféISO-8859-1 / Latin-1Y2Fm6Q==
caféUTF-16LE (Windows, PowerShell)YwBhAGYA6QA=

JavaScript's built-in btoa("🙂") throws an error, and some sites silently mangle non-ASCII text. This tool always uses UTF-8, so its output matches base64 on Linux and macOS, Python's base64.b64encode(s.encode()) and most APIs. When decoded bytes are not valid UTF-8, it offers them as a file download instead of showing garbled text.

URL-safe Base64, wrapping and data URIs

FAQ

Is my text or file uploaded anywhere?

No. Encoding, decoding and file conversion all happen in your browser; nothing is sent to a server or stored. It is safe for auth headers, API tokens and private documents.

How does "Base64 → file" pick the file type?

For a data URI it uses the declared type (for example image/png). Otherwise it reads the file signature in the first bytes — PNG, JPEG, GIF, WebP, PDF, ZIP, MP3, MP4 and more — and falls back to .bin.

Why do I get "invalid Base64 character"?

Usually quotes or commas came along with the copy, or a prefix like Basic or Bearer is still attached. Remove the character at the reported position and try again. A truncated string gives a length error instead.

Sources