Skip to content
utilhex

Base64 Encode / Decode

Encode text or files to Base64 and decode Base64 back to text or files. Supports UTF-8 and URL-safe Base64. Runs entirely in your browser.

Runs in your browserFree · No sign-up

About Base64 Encode / Decode

Base64 represents binary data as plain ASCII text. Use this tool to encode text (as UTF-8) or any file to Base64, create data URIs, or decode Base64 back into readable text or a downloadable file. URL-safe Base64 (base64url) is supported in both directions.

How to use Base64 Encode / Decode

  1. Choose Encode or Decode.
  2. Enter text, or choose a file to encode.
  3. Toggle URL-safe output if the result goes into a URL or JWT.
  4. Copy or download the result. Images and PDFs are shown first.

Examples

Text

"Hello, Utilhex" encodes to SGVsbG8sIFV0aWxoZXg=.

Inline image

Encode a small icon as a data URI to embed it in CSS or HTML.

Limitations

  • Base64 is an encoding, not encryption — anyone can decode it.
  • Encoded output is about 33% larger than the original data.
  • A decoded PDF larger than 40 MB is not drawn. Download it to view the pages.

Privacy

This tool processes everything locally in your browser tab. Your input is not uploaded to Utilhex or any third party, and it is discarded when you close or reload the page. Read the privacy policy for details.

Frequently asked questions

Is my input sent anywhere?

No. Processing happens in your browser. Utilhex does not send tool input to its servers, analytics, or any AI service.

What is URL-safe Base64?

It replaces + with - and / with _ and usually omits = padding so the value can appear in URLs and JWTs without escaping.

Why isn’t a decoded file shown as text?

The bytes are a file, such as a PDF or an image, rather than plain text. PNG, JPG, GIF, WebP, BMP, AVIF, and SVG are shown as an image, and each page of a PDF is shown in the preview. Other files, including HEIC, stay as a download named decoded.pdf, decoded.png, and so on.