🔐

Base64 Encoder / Decoder

Encode text or files to Base64 and decode Base64 strings back to plain text. Everything runs locally in your browser — nothing is uploaded to any server.

📁
Drop a file or click to browse
Supports any file type. Max 10 MB. File is read locally — never uploaded.
Preview
Advertisement
About this Base64 encoder and decoder

Base64 is a way of representing binary or text data using only 64 safe printable characters, so it can travel through systems that were built to handle plain text without getting corrupted.

This free encoder and decoder converts text both ways and can turn any file up to 10 MB into a Base64 string or a ready-to-use data URI. Everything runs in your browser, so it is fast and completely private. People reach for it to:

Encoding text or a file is straightforward: the tool reads your input, maps every three bytes to four Base64 characters, and adds padding so the length is always a clean multiple of four. Decoding simply reverses that process. Because the output is plain ASCII, it slots cleanly into config files, headers, and source code.

It is worth repeating that Base64 is encoding, not encryption. It hides nothing and adds no security — anyone can decode the string in seconds. Use it to move data around safely, and reach for real encryption or hashing whenever you actually need to protect it. Since none of your text or files are ever uploaded, you can safely encode tokens, documents, and confidential strings right here.

How to use
  1. Pick Text or File mode using the tabs at the top of the input panel.
  2. In Text mode, paste plain text or an existing Base64 string into the input box on the left.
  3. Click Encode to Base64 or Decode from Base64 — the result appears in the output panel on the right.
  4. In File mode, drop or browse for a file, then click Encode File to Base64 to get the string and an optional data URL.
  5. Use Copy Output to grab the result, or the swap button to feed the output back as input and round-trip it.
FAQ

Base64 turns binary or text data into a compact set of ASCII characters that survive systems built for plain text. It is used to embed images and fonts directly in CSS or HTML as data URIs, to attach files in email through MIME, to carry binary payloads inside JSON and XML, and to encode the segments of JSON Web Tokens.

No. Base64 is encoding, not encryption. There is no key and no secret involved, so anyone with the Base64 string can decode it instantly back to the original. For real security use proper encryption such as AES, or password hashing such as bcrypt or Argon2.

Base64 represents every 3 bytes of input as 4 printable characters, so the output is about 33 percent larger than the source. Padding with equals signs to reach a multiple of four can add a character or two more. This size cost is the trade-off for being safe to send through text-only channels.

Yes. Switch to File mode and drop in any file up to 10 MB. The tool reads it locally and returns the Base64 string, and for images it can also build a full data URI you can paste straight into a CSS background or an img src attribute. Nothing is uploaded to a server.

A data URI bundles a file directly into a URL using the form data:mediatype;base64,DATA. Browsers treat it as if it were a separate downloaded resource, which lets you inline small images, fonts, or icons without an extra network request. It is handy for tiny assets but bloats the page if overused.

Base64URL is a variant that replaces the plus and slash characters with dash and underscore, and usually drops the equals padding, so the result is safe to place inside URLs and HTTP headers. JSON Web Tokens use Base64URL for exactly this reason.

No. All encoding and decoding happens entirely in your browser using built-in JavaScript. Your text and files never leave your device, so you can safely process confidential strings, tokens, and documents without anything being uploaded or logged.