Base64 String Examples
Base64 encoding converts binary data into ASCII text. Here are common examples:
| Original | Base64 Encoded |
|---|---|
| Hello | SGVsbG8= |
| Hello World | SGVsbG8gV29ybGQ= |
| Base64 | QmFzZTY0 |
| 123456 | MTIzNDU2 |
| user@example.com | dXNlckBleGFtcGxlLmNvbQ== |
Loading your tools...
Encode and decode Base64 online. Convert string to Base64, Base64 to image (with preview), PDF, hex, or file. URL-safe mode for JWT tokens.
Loading Tool...
Base64 encode: Enter text or upload a file. Toggle 'Encode URL safe' for JWT tokens.
Base64 decode online: Paste Base64 string. Enable 'Decode URL safe' if using base64url format.
Base64 to image: Upload image (PNG, JPG) to encode, or paste Base64 to preview decoded image instantly.
Base64 to PDF: Upload PDF to encode, or decode Base64 and download PDF file.
Base64 decode to hex: Enable 'Hex output' to view decoded bytes as hexadecimal.
Copy result or download decoded file with one click.
Base64 to image: Embed images in HTML/CSS as data:image/png;base64,... for faster loading.
Base64 to PDF: Encode PDFs for API transmission or email attachments.
Base64 decode online: Debug API responses, JWT payloads, SAML tokens, or HTTP headers.
Base64 decode to hex: Inspect binary data structure for debugging or reverse engineering.
Web development: Create data URIs for icons, favicons, or inline images.
JWT tokens: Decode and inspect JWT headers and payloads with URL-safe mode.
Base64 encoding converts binary data into ASCII text. Here are common examples:
| Original | Base64 Encoded |
|---|---|
| Hello | SGVsbG8= |
| Hello World | SGVsbG8gV29ybGQ= |
| Base64 | QmFzZTY0 |
| 123456 | MTIzNDU2 |
| user@example.com | dXNlckBleGFtcGxlLmNvbQ== |
Base64 converts binary data into 6-bit chunks, mapped to 64 ASCII characters (A-Z, a-z, 0-9, +, /). Each group of 3 bytes (24 bits) becomes 4 Base64 characters. If the input isn't a multiple of 3 bytes, padding (=) is added.
| Feature | Standard Base64 | URL-Safe Base64 |
|---|---|---|
| Character 62 | + | - |
| Character 63 | / | _ |
| Padding | = | = (often omitted) |
| Use Case | Email, MIME, XML | JWT, URLs, filenames |
For JWT tokens, use Decode URL safe. For data URIs (data:image/png;base64,...), strip the prefix and paste only the Base64 part. For base64 to image preview, paste Base64 in the decoder—the image appears instantly.
Encode and decode Base64. Convert string to Base64, Base64 to image (with preview), PDF, hex, or file. URL-safe mode for JWT.