Base64 Encode / Decode
Encode text to Base64 or decode Base64 strings back to plain text.
Overview
Encode plain text to Base64 or decode Base64 strings back to plain text. Base64 is widely used to safely transmit binary data or structured text through systems designed for ASCII text — such as email, HTTP headers, JWT tokens, and data URI schemes. This tool handles both standard and URL-safe Base64 variants.
Common use cases
- Decode a JWT token payload to inspect claims and expiry.
- Encode credentials for Basic Auth HTTP headers.
- Inspect Base64-encoded email attachments or API payloads.
- Generate data URIs for small image embedding in HTML.
Examples and notes
- 'Hello, World!' encodes to SGVsbG8sIFdvcmxkIQ== in Base64.
- A JWT token's middle segment is Base64url-encoded JSON containing user claims.
- Basic Auth headers encode 'user:password' as Base64 for the Authorization header value.
Important note
Base64 is encoding, not encryption. Anyone with the encoded string can decode it instantly. Do not use Base64 to obscure sensitive data. For security, use proper encryption.
Frequently Asked Questions
What is Base64 used for?
Base64 encodes binary data as ASCII text for safe transport through text-based systems — common in email attachments, data URLs, JWT tokens, and HTTP Basic Auth headers.
Can I encode files with this tool?
This tool encodes text strings only. For file-to-Base64 conversion, use a dedicated binary encoder that reads raw file bytes.
How do I decode a JWT token payload?
A JWT has three Base64url-encoded parts separated by dots. Copy the middle segment (the payload) and decode it here to read the claims.
What is the difference between Base64 and Base64url?
Base64url replaces + with - and / with _ to make the string safe for URLs and filenames. JWT tokens use Base64url encoding.