YamlBox

Web & encoding

Base64 Encoder & Decoder

Encode UTF-8 text to Base64 or decode Base64 back to text, including URL-safe variants and non-ASCII content. Input line breaks (as seen in PEM files) are tolerated.

Options

Text or Base64

Examples: Text to encode · Base64 to decode · URL-safe input — ⌘/Ctrl + Enter converts · drop a file to load it · processed locally

Conversions

Output is read-only. Use Copy, Download or Share to move it out.

How to use the base64 encoder / decoder tool

  1. Paste text or Base64

    The mode toggle decides the direction; use auto to have short, alphabet-only strings tried as Base64.

  2. Toggle URL-safe if needed

    URL-safe Base64 swaps + for - and / for _, and drops padding — required in query parameters and JWT segments.

  3. Copy the result

    Line breaks in input are ignored, so you can decode a wrapped certificate or PEM body directly.

What makes this one different

  • Correct UTF-8 handling — accents, CJK and emoji round-trip perfectly
  • URL-safe alphabet option with padding handling
  • Whitespace and line breaks in input are tolerated
  • Precise errors for invalid characters or truncated data
  • Also shows byte length, useful for size checks

Privacy by architecture: this page contains no analytics that receive your input, and the conversion code runs in your tab. You can disconnect from the network after loading and keep working.

Base64 Encoder / Decoder — frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption — it has no key and offers zero confidentiality. Treat Base64-encoded data as plaintext that merely looks scrambled. Use encryption (TLS, AES, age) when secrecy is needed.

Why is Base64 sometimes URL-safe with - and _?

Standard Base64 uses + and /, which are problematic inside URLs and identifiers. The URL-safe variant (RFC 4648 §5) substitutes - and _ and often omits the = padding, so the value survives being placed in a query string or filename.

How do I decode Base64 to a file or image?

This tool decodes to text, which is right for text payloads. If the decoded bytes are an image or archive, this decoder reports that clearly instead of printing garbage — use a bytes-to-file tool for those.

Why does my Base64 string end with = or ==?

Padding. Base64 encodes 3 bytes into 4 characters; when the input length is not a multiple of three, the encoding pads with = to keep the block complete. Padding is often optional and is stripped in URL-safe usage.

Searching for “base64 decode online”, “base64 encode”, “base64 converter”? You are in the right place — browse all 19 tools.

Deeper reading

Blog · 5 min read Base64 decode and encode: for transport, not security Base64 decode and encode in the browser — the 4/3 size rule, padding, the base64url variant and the Unicode bug that makes decoded text look like garbage. Read the guide →