What is Base64?
Base64 is an encoding scheme that converts binary data — or any text — into a string made up only of letters, numbers, and a few symbols. The result is safe to transmit through systems that might otherwise misinterpret special characters, like email, URLs, or HTML attributes.
You’ll encounter Base64 regularly when dealing with email attachments, embedding images directly into web pages, passing data in URLs, or reading authentication tokens. It’s not encryption — anyone can decode it — it’s purely a way to represent data in a universally safe text format.
What Does This Tool Do?
This tool encodes plain text or binary data into Base64 format and decodes Base64 strings back to their original form. It works instantly in your browser as you type.
Toggle URL-safe to swap the standard alphabet (+, /, =) for the URL-safe variant (-, _, no padding) — the form used in JWTs, OAuth state parameters, and any token that travels in a URL or filename.
How to Use This Tool
- Choose the mode: Encode to convert text to Base64, or Decode to reverse it.
- Optionally toggle URL-safe if you need the URL-friendly alphabet.
- Type or paste your input into the text area.
- The result appears immediately.
- Click the copy button to grab the output. The decoder accepts both standard and URL-safe input automatically.
Common Use Cases
- Basic authentication: HTTP Basic Auth credentials are sent as Base64-encoded
username:password. - Embedding images: Inline images in HTML or CSS use Base64-encoded data URIs.
- Inspecting tokens: Many API tokens and JWTs contain Base64-encoded segments.
- Data transfer: Safely pass binary or special-character data through systems that only accept plain text.
Frequently Asked Questions
Is Base64 the same as encryption?
No. Base64 is encoding, not encryption. Anyone can decode a Base64 string without a key. Never use it to protect sensitive information.
Why does Base64 output end with = signs?
Base64 works in groups of 3 bytes. If the input isn’t a multiple of 3 bytes, padding characters (=) are added to complete the group. This is normal.
What is URL-safe Base64?
Standard Base64 uses + and / in its alphabet, plus = for padding — characters that need escaping in URLs and aren’t valid in filenames. URL-safe Base64 swaps + for - and / for _, and drops the = padding entirely. It’s the form used by JWTs, OAuth, and most modern tokens.
Is my data safe?
Yes — all encoding and decoding happens locally in your browser. Nothing is sent to a server.