Base64 Encoder & Decoder

Encode and decode Base64 online. Supports text and files, plus URL-safe Base64. Fast, free, and fully client-side.

// base64encodestandard0 b out○ ready
Plain text
Base64

About this Base64 encoder & decoder

Base64 is a way of representing binary data using only printable ASCII characters. It is widely used to embed images in HTML and CSS (data URLs), to send binary data in JSON and XML, and in email attachments. This tool encodes and decodes Base64 for both plain text and files, with support for the URL-safe variant.

Everything runs locally in your browser, so it is safe to paste tokens, credentials, and private payloads — nothing is uploaded.

How to use it

  1. Choose Encode or Decode.
  2. Paste your text, or load a file with “Encode file”.
  3. Toggle URL-safe if your Base64 uses - and _ instead of + and /.
  4. Copy the result from the right pane.

Frequently asked questions

Is my data sent to a server when I encode or decode?
No. Encoding and decoding happen entirely in your browser with JavaScript, so your text and files never leave your device.
What is URL-safe Base64?
Standard Base64 uses + and / characters and = padding, which have special meanings in URLs. URL-safe Base64 replaces + with -, / with _, and drops the padding so the result can be used directly in URLs and filenames.
Can I encode binary files?
Yes. Use the “Encode file” button to load any file — image, PDF, or binary — and get its Base64 representation, which is useful for data URLs and embedding.
Why does decoding fail sometimes?
Decoding fails when the input is not valid Base64 — for example if characters are missing, or if URL-safe input is decoded in standard mode. Toggle URL-safe to match how the data was encoded.

// More tools