Base64 Encode / Decode
Runs in browserEncode and decode Base64 text privately in the browser.
Encode text to Base64 or decode Base64 to text in your browser. Handles UTF-8 safely. No data is sent to any server.
Base64 Encode / Decode tool
Input: 53 characters
Files never leave your browser.
Drag and drop a file here, or tap to select
Base64 output
SGVsbG8sIFRvb2xEb2NrISBUaGlzIHRleHQgd2lsbCBiZSBlbmNvZGVkIHRvIEJhc2U2NC4=Output: 72 characters
🔒 Runs in your browser · No uploads · Your data never leaves your device
How to use
Choose mode
Switch between Encode (text → Base64) and Decode (Base64 → text) using the buttons.
Enter input
Type or paste your text or Base64 string. Decoding supports standard Base64; invalid input shows an error.
Copy result
Use the Copy button to copy the encoded or decoded result.
Common use cases
- Decoding JWT payloads — Base64-decode the payload section of a JWT token to inspect claims without a dedicated JWT tool.
- Encoding binary data for APIs — Encode file contents or binary blobs to Base64 before embedding them in JSON API requests.
- Debugging HTTP headers — Decode Base64-encoded Authorization headers to verify credentials being sent by an HTTP client.
- Embedding images in HTML/CSS — Encode small images to Base64 for use in data URIs directly in HTML or CSS.
Examples
Encode example
Encoding 'Hello' produces the following Base64.
InputHelloOutputSGVsbG8=
Frequently asked questions
- Is UTF-8 supported?
- Yes. Encoding and decoding correctly handle multi-byte UTF-8 characters so non-ASCII text works as expected.
- Why does decoding sometimes fail?
- Base64 strings must use the standard alphabet and padding. Extra spaces or invalid characters will cause a decode error. Remove line breaks or other noise and try again.
Key concepts
- Base64
- An encoding scheme that converts binary data into ASCII text using 64 printable characters, commonly used to transmit data in text-based formats.
- Padding
- The = characters appended to Base64 output to ensure the encoded string length is a multiple of 4.
- Data URI
- A URL scheme (data:...) that embeds file data inline in HTML or CSS as Base64-encoded content.
Related tools
You might find these useful too.