Base64 shows up in places that feel unrelated: a data:image/png;base64,… URL in a stylesheet, a JWT payload, an email attachment, a YAML secret that is only “hidden” because it looks messy. The last of those is the trap. Encoding is not encryption. Anyone can decode it in a second.

The useful skill is to encode and decode accurately, with the right variant, without shipping a file to a random website.

What this workspace can do

The Base64 Encoder/Decoder on ToolSphare runs in the browser. The page states that text and files never leave the device. Tabs and sections cover text encode/decode, Encode / Decode File, URL Safe Base64, optional History, and a short How It Works panel.

For text, you paste into Input text, then read Encoded output and Decoded output, with character and byte counts. Options:

  • Character encoding: UTF-8 (Unicode) or Latin-1 (ISO-8859-1)
  • Line wrap: no wrap, 64 characters (MIME), or 76 characters (RFC 2045)
  • URL Safe Base64 (- and _ instead of + and /)
  • Add padding (=)
  • Convert automatically while typing
  • Save conversion history on this device

Quick actions include Encode Text, Decode Text, Auto Detect, Reset All, and file encode/decode. The file tab accepts any file type, processed locally, maximum 20 MB, and can include a Data URL prefix when encoding (recommended on the page for web assets). History, if you enable it, stays in that browser.

Sample strings on the page include SGVsbG8gV29ybGQh for Hello World!, which is a handy sanity check: if you decode that sample and do not see Hello World!, you are in the wrong mode.

How to use it

  1. Open the Base64 Encoder/Decoder.
  2. Paste plain text (to encode) or a Base64 string (to decode) into the input box. Or drop a file on the file tab.
  3. Choose UTF-8 unless you already know the source is Latin-1. Enable URL-safe and adjust padding if the string will sit in a query parameter. Use 76-character wrap for email-style output.
  4. Click Encode Text or Decode Text, or let live conversion run if you turned it on. Auto Detect is there when you are unsure which way the text is going.
  5. Copy or download the result. Clear the boxes and the local history if the payload was sensitive.

A practical example: a query string and a small asset

Suppose you need to put subjects?id=42&ok=1 into a URL-safe field. Standard Base64 for that UTF-8 string is:

c3ViamVjdHM/aWQ9NDImb2s9MQ== 

The / in the middle will break or confuse a path or query if you paste it raw. URL-safe encoding uses _ instead:

c3ViamVjdHM_aWQ9NDImb2s9MQ== 

Turn on URL Safe Base64 before you encode, then copy the result. If the receiving API also wants padding stripped, uncheck Add Padding and encode again rather than deleting = by hand and hoping.

For a small icon in a CSS file, use the file tab, enable Include a Data URL prefix, and encode. You should get a string that starts with something like data: plus a MIME type, which a stylesheet can use without a separate image request. Stay under the 20 MB file cap, and remember that inlining a large image will bloat the CSS.

JWT payloads are also Base64 (usually URL-safe, often without padding). Decoding one will show you the JSON claims. It will not verify the signature, and it will not make those claims trustworthy.

What Base64 will not do

It will not hide passwords. A string ending in = is not a vault. If you must transport a secret, use real encryption or a secret manager, not encoding.

It can also go wrong if you pick Latin-1 for Urdu or other Unicode text: characters will be lost or garbled. Prefer UTF-8 unless you are matching a legacy system.

FAQ

Is Base64 encryption?
No. It is an encoding. Anyone with a decoder can recover the original bytes.

What is URL-safe Base64?
It replaces + with - and / with _, and often omits padding, so the string can sit in a URL without extra escaping. The workspace has a dedicated option and tab for this.

Can I encode a file?
Yes, locally, up to 20 MB. Encode produces Base64 text; decode expects Base64 text and downloads the binary result.

Disclosure: I build ToolSphare, the free tools site that hosts the encoder described above.