Guides

What is Base64 encoding? (and when not to use it)

Base64 turns binary or awkward text into ASCII-safe strings for APIs and data URIs. It is encoding—not encryption.

Encoding, not secrecy

Base64 represents data using a 64-character alphabet so it can travel safely through systems that expect text. Anyone can decode it. Never treat Base64 as a way to hide passwords, tokens, or personal data.

You will see it in HTTP basic auth, email attachments (historical MIME), JWT parts, and CSS/HTML data URIs for small images.

Why the output looks longer

Base64 encodes every three bytes as four characters, so the result is about 33% larger than the input. Padding with = aligns the length to a multiple of four.

Try it locally

Use our Base64 tool to encode or decode sample strings in your browser when you are debugging an API payload or checking a data URI—without uploading the content.

Try related tools

More guides · All tools