Base64 Encoder for developers. Convert text, JSON, or files to Base64 and back. Decode JWTs, detect data URIs and Basic Auth headers automatically, and share any result via URL. Perfect for API payloads, data URIs, email MIME encoding, and Basic Auth headers. Handles Unicode correctly. Free, private, no signup.
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=The string after "Basic" is the Base64 encoding of
username:password. Always use HTTPS with Basic Auth so the credential is transmitted over an encrypted connection.
background-image: url("data:image/png;base64,iVBORw0KGgoAAA...");Small images and icons can be embedded directly into a stylesheet as a data URI to reduce the number of HTTP requests.
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0In0.abcA JWT is three Base64URL segments joined by dots: header, payload (claims), and signature. Decode the first two segments with the JWT tab above to inspect the token's contents.
Content-Transfer-Encoding: base64 header tells the client how to decode the attachment.
Tip: press ⌘/Ctrl + Enter inside any input to run the encoder or decoder.
Most Base64 tools break on emoji. This one does not.
Paste a string with accented letters or an emoji. Watch a naive Base64 encoder throw an error.
The problem is btoa(). It works on bytes. Not characters. Any codepoint above 255 crashes it.
This tool converts your string to UTF-8 bytes first. Then it applies Base64 to those bytes.
The result is correct for every language and every Unicode character.
Base64 encodes bytes, not characters
A character like Γ© is one character. But it takes two UTF-8 bytes.
An emoji like π is one character. Four UTF-8 bytes.
Base64 has no idea about characters. It only sees bytes. That is why encoding must happen at the byte level.
The tool uses the browser's TextEncoder API. It handles the conversion for you.
Auto-detection saves you a step
Paste a string into the decoder. The tool inspects it before decoding.
JWT tokens are three Base64URL segments separated by dots. The tool recognises them and offers a jump to the JWT tab.
Data URIs start with data:. The Base64 payload is extracted automatically.
Basic Auth headers look like Authorization: Basic dXNlcjpwYXNz. The tool strips the prefix and decodes the payload.
JSON is flagged when the decoded output parses cleanly. Binary data is flagged when non-printable bytes appear.
The JWT decoder
JSON Web Tokens are everywhere in modern auth. A JWT has three parts.
Header. Payload. Signature. Each part is Base64URL encoded.
The JWT tab parses the header and payload as JSON. It extracts standard claims in human-readable form.
exp shows the expiry time and a relative countdown. iat shows when the token was issued. nbf shows the not-before time.
You also see the raw signature bytes. But the tool does not verify the signature. That requires the secret or public key. Which never leaves your server.
Base64 is not encryption
This is the most important thing to understand. Base64 does not protect data.
Anyone with the Base64 string can decode it in one step. No key needed.
Use Base64 for transport. Use encryption for confidentiality. The two solve different problems.
TLS certificates, Kubernetes secrets, and MIME email attachments all use Base64. None of them rely on it for security.
What this tool does not do
It does not verify JWT signatures. It does not encrypt data. It does not compress.
It does not stream very large files. Files over 15 MB may slow down your browser tab.
It does not replace your server-side Base64 library. Use it for debugging, inspection, and one-off conversions.
Privacy and speed
Everything runs in your browser. Text, files, and JWT tokens never leave your device.
No uploads. No accounts. No ads inside the tool.
Your recent encodes and decodes are saved in localStorage on your device. Up to 10 items. Clear your browser data and they are gone.
Use it for a quick JWT inspection, a data URI conversion, or a full file-to-Base64 run. The numbers never leave your machine.
Frequently Asked Questions
What is Base64 encoding used for?
Is Base64 encryption?
What is the difference between Base64 and Base64URL?
+ with - and / with _, and often omits the = padding. It exists because + and / have special meaning in URLs and filenames. JWTs use Base64URL. This tool supports both, and the decoder auto-detects URL-safe input.