DT Dev Tools

Base64 Encode/Decode

Encode and decode Base64, URL-safe base64url and data URIs. Convert files to Base64, view decoded bytes as hex and download them β€” all in your browser.

πŸ”’ Runs entirely in your browser β€” nothing is uploaded

Drop a file to encode it as Base64 or click to browse β€” images, PDFs, fonts, anything

Was this tool useful? Rate it:

What Base64 Encode/Decode does

Base64 Encode/Decode converts normal text into Base64 and converts Base64 back into readable UTF-8. Developers often meet Base64 in data URIs, Basic authentication headers, email attachments, JWT segments, small binary payloads, and examples copied from API documentation. Text goes through TextEncoder and TextDecoder, so emoji, accents, Cyrillic and other Unicode text round-trip correctly.

Beyond plain text, the tool handles the variants you meet in real projects. URL-safe base64url replaces + and / with - and _ and removes padding, which is what JWTs and many web APIs use. MIME wrapping splits output into 76-character lines for email and PEM-style files. Drop an image, PDF, font or any other file to encode it, optionally as a complete data: URI you can paste into CSS or HTML. When decoded data is not valid UTF-8 text, the bytes are shown as hex and the detected type (PNG, JPEG, PDF, ZIP and more) is used to name the downloaded file.

Private browser-based workflow

All processing happens with in-browser JavaScript. The tool does not upload your text, files, tokens, URLs, snippets, or generated values to a server, and it does not require an account. That privacy model is important because small utilities often receive real API responses, configuration samples, logs, authentication data, or customer-shaped examples during troubleshooting. Keeping the work local reduces risk and also makes the tool feel instant because there is no network round trip.

Practical tips

Remember that Base64 is not encryption. Anyone with the string can decode it, so do not use it to hide secrets. Decoding is forgiving: whitespace and line breaks are ignored, missing padding is restored, URL-safe characters are accepted, and a data: prefix is stripped automatically. Base64 makes data about 33% larger, so embedding big images as data URIs usually hurts page performance β€” keep inline assets small and serve larger files normally.

How to use

  1. Paste text or drop a fileEnter plain text, Base64, base64url or a data: URI, or drop a file to encode.
  2. Pick options and convertChoose URL-safe or 76-character MIME wrapping, then click Encode or Decode.
  3. Copy or downloadCopy the result, move it back to the input, or download decoded binary data as a file.

Frequently asked questions

Is Base64 secure?
No. Base64 is an encoding, not encryption.
What is URL-safe Base64 (base64url)?
A variant that uses - and _ instead of + and / and drops the = padding, so the value can sit in URLs, file names and JWTs. Tick URL-safe to produce it; decoding accepts both forms automatically.
Can I encode images and other files?
Yes. Drop any file to get its Base64 string, optionally as a ready-to-use data: URI. Decoding binary data shows the bytes as hex and lets you download the original file.
Is anything uploaded?
No. Conversion happens locally.