Base64 Encode / Decode

Encode or decode Base64 text (UTF-8 safe).

No upload

Loading tool…

Processing happens on your device using your browser's CPU/GPU. Results are kept only in this tab's memory and are wiped when you click “Clear” or close the page.

About Base64 Encode / Decode

Base64 turns any text or file into plain letters and digits that survive email, JSON payloads and URL parameters. Encode a string, decode one you received, or convert a small file into a Base64 blob for a data URI. Handy for developers debugging API tokens, webhook bodies and embedded images. Encoding is done with the browser's own functions, so nothing you paste is uploaded or stored.

How to use Base64 Encode / Decode

  1. Switch between Encode and Decode with the toggle at the top.
  2. Paste your text or Base64 string into the left pane; the result updates as you type.
  3. Tick URL-safe to swap + and / for - and _ and drop the padding, for use in URLs and JWTs.
  4. Use Encode a file to turn a small image or document into a Base64 string.
  5. Copy the result or download it as a .txt file.

What people use it for

  • Decoding the payload section of a JWT to see which claims an API returned
  • Embedding a small logo in CSS or HTML as a data URI instead of a separate request
  • Encoding a username and password pair for an HTTP Basic Authorization header
  • Reading a Base64 body from a webhook or a log line while debugging

Good to know

Text is handled as UTF-8, so Hindi, Tamil and emoji-bearing strings round-trip correctly. Encoded output is about 33 percent larger than the original, which makes Base64 a poor choice for large files. Whitespace and line breaks in pasted Base64 are ignored and missing padding is added automatically before decoding.

Frequently asked questions

Is Base64 a form of encryption?
No. It is a reversible encoding with no key and no secret, and anyone can decode it instantly. Never use it to protect passwords or personal data.
What does URL-safe mean?
It replaces + with - and / with _ and removes the trailing = padding, so the string can sit in a URL or a JWT without being re-escaped. Decoding accepts both forms.
Why does my decoded text look like gibberish?
Either the input was not valid Base64, or it encodes binary data such as an image rather than text. Binary content cannot be shown meaningfully as characters.
Can I encode a large file?
Small files work fine, but a large one will use a lot of memory and produce a string roughly a third bigger than the file. Everything is processed locally in your browser.