WebTooli

Base64 Encoder & Decoder - Text, Files & JWT

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.

Recent: Your recent encodes and decodes will appear here
Characters: 0 UTF-8 bytes: 0 Lines: 0
Output characters: 0 Size ratio: —
Characters: 0 Detected: —
A JWT is decoded locally in your browser. This tool does not verify the signature, and it never sends the token anywhere.
πŸ“Ž
Drop a file here, or click to browse
Any file type · Ideal for images, fonts, small assets · Max 15 MB recommended
β„Ή️ Base64 is an encoding scheme, not encryption. It converts binary data into a text-safe format that can be transmitted through systems designed for text. It does not protect the data. Anyone with the Base64 string can decode it. Use Base64 for transport and storage, and use proper encryption for confidentiality.
β„Ή️ 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.abc

A 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.
β„Ή️ Email attachments are encoded as Base64 within the MIME multipart body. The Content-Transfer-Encoding: base64 header tells the client how to decode the attachment.
All conversions run in your browser using the standard Base64 algorithm (RFC 4648). No data is uploaded or stored.
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?
Base64 is used whenever binary data needs to travel through a text-only channel. Common examples include API request bodies, email MIME attachments, data URIs in CSS, HTTP Basic Authentication headers, JSON Web Tokens, and configuration files for cloud services like Kubernetes or AWS.
Is Base64 encryption?
No. Base64 is an encoding scheme, not encryption. It converts binary data into printable text using a public algorithm, and anyone can decode it without a key. Use Base64 for transport and storage, and use proper encryption (AES, TLS) for confidentiality.
What is the difference between Base64 and Base64URL?
Base64URL is a variant that replaces + 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.
← Back to all tools