Base64

Encode and decode Base64 strings and files

Use the interactive tool with JavaScript enabled.

About this tool

Convert text or binary data to Base64 and back in seconds. Supports both standard Base64 and URL-safe Base64 (RFC 4648), which replaces + with - and / with _ for use in JWTs and URLs. Paste text or upload a file — the output appears instantly without any server round-trip. Useful for embedding images in HTML as data URIs, encoding API payloads, and debugging authentication tokens.

Questions and answers

What is the difference between standard and URL-safe Base64?
URL-safe Base64 replaces + with - and / with _, making the output safe for URLs, filenames, and JWTs without requiring percent-encoding.
Can I encode binary files?
Yes, upload any file and it will be Base64-encoded entirely in your browser without being uploaded to a server.

Related tools

  • URL Encode — Percent-encode and decode URLs and query strings
  • Escape / Unescape — Escape and unescape HTML, JS, JSON, and URL strings
  • Image → Base64 — Convert images to Base64/Data URIs — file never leaves your browser
  • JWT Decoder — Decode and inspect JWT tokens

Tool processing runs in your browser. Privacy policy and cookie preferences.

Read this guide as Markdown