Bug Days

Base64 Encoder & Decoder

Convert UTF-8 text, Base64URL values, data URIs, or a local file—then copy, download, or share a safe example.

Text stays in this browser.

Base64 encoding is not encryption

Base64 converts bytes into printable characters. Anyone who has the value can decode it, so do not treat a Base64 token as secret protection. It also adds size; use it only where a text-only format such as JSON, XML, an email attachment, or a data URI requires it.

UTF-8, Base64URL, and binary files

Older browser snippets using btoa break on emoji and other non-ASCII text. This page converts text to UTF-8 bytes first. Base64URL is the URL-safe variant used by JWTs: it replaces + and /, and often removes trailing = padding. Local file encoding preserves the raw bytes instead of guessing a character encoding. Follow the Base64, UTF-8, and Base64URL guide for worked examples.

Share a reproducible example, not production data

Use the visible Share example action to preserve an input and operation for a colleague. Links are useful for synthetic samples and bug reports; anyone with a shared link can read its included input. Keep credentials, customer data, and private files out of shared examples.

Encoding details such as padding, Base64URL and UTF-8 are easy to forget and common in interviews. Synapticz is a spaced repetition quiz app for developers and students that builds questions from your own notes and reminds you to review them.

Common Base64 questions

What is Base64?

Base64 is a text representation of bytes. It is useful when a system accepts text but needs to carry binary data; it is not encryption or compression.

Does Base64 support Unicode and emoji?

Yes. This tool encodes text as UTF-8 before Base64 conversion, so accented characters and emoji round-trip correctly.

What is Base64URL?

Base64URL uses - and _ instead of + and / and may omit padding. JWT sections commonly use this URL-safe form.

Can I encode a file without uploading it?

Yes. Choose a local file and its bytes are read and converted in the browser. Nothing is uploaded unless you explicitly create a share link.

Why does decoded Base64 look unreadable?

It may be binary data or compressed bytes. A value beginning H4sI often needs the GZip Base64 decoder rather than ordinary text decoding.