Dev Tools

Base64 Tools

Encode and decode Base64 for text, files, and images. Encoding is not encryption.

8 tools · 100% browser-based · No uploads · No signup

About these Base64 tools

Base64 turns binary into ASCII so it can travel through JSON, email, or a data URI. These tools encode and decode text, files, and images, convert URL-safe alphabets, validate padding, and split long strings for PEM or source files.

Base64 is encoding, not encryption. Anyone who sees the string can decode it. Use it to embed a small image or ship bytes through a text-only channel, not to hide a password.

Tools in this category

How these tools run in your browser

Encoding uses the browser's btoa / TextEncoder / FileReader path depending on the tool. Images can be previewed as data URIs. URL-safe mode maps +// to -/_ and may strip padding, which some APIs require.

Common Use Cases

  • Embed a small icon as a data URI in CSS or Markdown
  • Decode a JWT-style or HTTP Basic credential you already understand is not a secret store
  • Convert between standard Base64 and the URL-safe alphabet that replaces + and /
  • Check padding and illegal characters before an API client fails
  • Turn a file into Base64 for a fixture in a unit test

Common Mistakes

UTF-8 text must be encoded as bytes first. Naive btoa on Unicode throws or corrupts characters.
Missing padding (<code>=</code>) is common in JWTs. Validators should allow that when the spec does.
Huge files as Base64 inflate by about 33% and can lock the tab.
Never treat Base64 as a way to protect API keys in frontend code.

Frequently Asked Questions

Why is the decoded output garbage?

You may have URL-safe Base64 in a standard decoder, or the string is hex/binary rather than Base64. Try the URL-safe converter or hex tool first.

Is Base64 compression?

No. It increases size. Compress first (gzip, brotli, image codecs), then encode if you must put bytes in JSON.

When do I need URL-safe Base64?

When the string goes in a query parameter, filename, or JWT. Standard Base64 uses + and / which break URLs unless percent-encoded.