zzzbbb.net

Encoding and Security

Base64 Encode/Decode

Safely encode UTF-8 text to Base64 or decode Base64 back into readable text in a browser-only workflow, with Base64URL and padding controls.

Try This Tool

Paste your input, run the tool, and review the result instantly.

The result updates automatically after you pause typing. For longer text, you can still use the Run button for a manual check.

Description

Overview

This page explains what the tool does, when to use it, and how to test it quickly with a built-in sample.

Encode or decode text with Base64.

Sample Input

Paste the sample below to check the processing flow immediately.

Hello zzzbbb!

This utility is useful when debugging payload fragments, browser APIs, and text-based transfers that rely on Base64. It keeps the work local and fast for quick validation loops.

Everything runs in the browser, so pasted text is not uploaded to a server. That makes it suitable for quick checks on short-lived tokens, URL payload fragments, and internal debug text.

When to use it

  • Convert plain UTF-8 text into standard Base64 for transport in JSON, logs, or browser storage
  • Decode Base64 back into readable text when inspecting API responses or copied payload fragments
  • Switch to Base64URL when the value will be embedded in URLs, cookies, or JWT-style structures
  • Test whether padding should stay, be removed, or be auto-restored during decode

Base64 vs Base64URL

Standard Base64 uses +, /, and often = padding. Base64URL changes the alphabet to - and _ so the string remains URL-safe without additional escaping.

  • Standard Base64: best for generic storage and text transfer
  • Base64URL: best for URLs, cookies, signed links, and token-like values

If you are decoding a value copied from a JWT or a URL parameter, Base64URL is usually the safer starting point.

Padding behavior

Padding with = helps standard Base64 keep a length divisible by 4. Some systems remove padding to make values shorter.

  • include: keep or restore standard padding
  • omit: remove trailing = from the output or expect unpadded input
  • auto: normalize incomplete decode input by restoring missing padding when possible

Common mistakes

  • Treating Base64 as encryption: anyone can decode it without a secret key
  • Decoding partial strings copied from logs or emails: even one missing character can break the result
  • Mixing Base64 and Base64URL alphabets without normalizing +// vs -/_
  • Expecting non-UTF-8 bytes to render as clean text after decode

FAQ

Does it support non-English text?
Yes. UTF-8 text is supported.
Is Base64 encryption?
No. It is an encoding format, not encryption.
What is the difference between Base64 and Base64URL?
Base64URL replaces `+` and `/` with `-` and `_` so the result can be used safely in URLs, cookies, and JWT-like payloads.
Why does padding matter?
Standard Base64 often keeps `=` padding, while URL-safe payloads may omit it. This tool lets you include, omit, or auto-normalize padding depending on the input.
Why does decoded text sometimes look broken?
Base64 only preserves bytes. If the original text was not UTF-8 or the input is incomplete, the decoded result may look corrupted.

Related Tools

Explore More

This tool belongs to the Encoding and Security category. You can compare similar workflows from all tools on the tools hub .