1. Home
  2. Developer tools
  3. Base64 Encode / Decode

Base64 Encode / Decode

Encode any text or file to Base64, or decode Base64 back to readable text or the original file.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Base64 Encode / Decode

  1. Pick Encode or Decode.
  2. Type text or drop a file.
  3. Copy the result or download the decoded file.

Features

  • Full UTF-8
  • URL-safe alphabet
  • Files of any type
  • Decode to a file

Supported formats

You can open

  • Text
  • Any file

You get

  • Base64
  • File

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the Base64 Encode / Decode is safe for contracts, IDs, photos and work documents. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Base64 is an encoding, not encryption: anyone can decode it. Do not use it to hide passwords or other secrets.

Guide

Base64 encoding and decoding explained, with the pitfalls

Base64 is how binary data travels through channels built for text: email attachments, JSON payloads, data URLs in HTML and CSS, HTTP Basic authentication headers, tokens and configuration files. It turns any bytes into a string of 64 safe characters (A–Z, a–z, 0–9, + and /) and back again. This tool encodes and decodes text and files in your browser.

Encoding text

  1. Choose Encode.
  2. Type or paste the text. It’s converted to bytes as UTF-8, so accents, other scripts and emoji survive the round trip.
  3. Optionally switch on URL-safe for tokens, URLs and file names.
  4. Copy the Base64.

For example, Hello, world! becomes SGVsbG8sIHdvcmxkIQ==.

Decoding

Choose Decode and paste the Base64. The decoder is forgiving:

  • Standard and URL-safe alphabets are both accepted.
  • Missing padding (the trailing =) is added automatically.
  • Line breaks and spaces, common in email and PEM files, are ignored.
  • A data URL prefix such as data:image/png;base64, is stripped.

If the decoded bytes are readable UTF-8 text, you see the text. If not, the result is binary data, such as an image, a PDF or a compressed file, and you can download it with the File button.

Invalid input produces a specific error: characters outside the Base64 alphabet, or a length that can’t be valid.

Encoding a file

Drop any file into Encode a file to get its Base64. Copy it as plain Base64 or as a data URL, ready to paste into HTML or CSS. The tool shows how long the text is, which is a good reason to think twice before embedding large files.

Size: the 33% rule

Base64 represents every 3 bytes as 4 characters, so encoded data is about a third larger than the original:

Original Base64 (approx.)
3 bytes 4 characters
30 KB icon 40 KB
1 MB image 1.33 MB

That’s fine for small icons and test data. For large images on websites, a normal file reference is better: it’s smaller, cacheable, and doesn’t bloat your HTML or CSS.

Standard vs URL-safe

Variant Characters 62 and 63 Padding Where it’s used
Standard + and / = Email, data URLs, most APIs
URL-safe - and _ Usually none JWTs, URL parameters, file names

If an API rejects your Base64, check which variant it expects.

It is not encryption

Base64 hides nothing: anyone can decode it in a second. Credentials in an HTTP Basic auth header, for example, are only Base64-encoded, which is why such requests must use HTTPS. Use real encryption for secrets, and never treat Base64 as a way to obscure passwords.

Common uses

  • Inspecting the payload of a JWT (use the JWT Decoder for a full view).
  • Reading Basic auth headers while debugging.
  • Embedding small images in HTML or CSS (the Image to Base64 tool adds ready-made snippets).
  • Decoding attachments or payloads from logs and API responses.

Who encodes and decodes Base64

  • Developers debug API payloads, data URLs and authorization headers.
  • Email and web developers inspect encoded attachments and embedded images.
  • Security learners see how encoding differs from encryption.
  • DevOps engineers read Kubernetes secrets and configuration values, which are stored Base64-encoded.

A complete example: reading a Kubernetes secret value

A secret shows ZGF0YWJhc2UtdXNlcg== for a user name:

  1. Choose Decode and paste it.
  2. The result is database-user.
  3. Remember that Base64 hides nothing: anyone with the secret object can decode it, so access to secrets must be restricted.

Tips

  • Turn on URL-safe for values that go into URLs or file names.
  • Expect encoded data to be about a third larger.

Checked against the current version of the Base64 Encode / Decode on .

Troubleshooting

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

Is Base64 encryption?

No. Base64 is a reversible encoding that anyone can decode instantly. It makes binary data safe to send through systems that expect text, but it hides nothing. Never use it to protect passwords or secrets.

Why is the Base64 output bigger than the input?

Base64 uses four text characters for every three bytes, so encoded data is about 33% larger, plus a little padding. That's the price of making binary data text-safe.

What is URL-safe Base64?

Standard Base64 uses + and /, which have special meanings in URLs and file names. The URL-safe variant uses - and _ instead and usually drops the = padding. JWTs use it. The decoder here accepts both forms.

Why does my decoded text show strange characters?

The data probably isn't UTF-8 text. It may be an image, a compressed file or text in an older encoding. When the bytes aren't valid UTF-8, the tool offers them as a file to download instead of showing garbled text.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.