Skip to content

Base64 Encode

Converts text or a file into Base64, with URL-safe and line-wrapping options.

Your data stays on this device

This tool runs entirely inside your web browser. Your data is processed on your own device and is never sent to our servers. How this works

Base64

Base64 Encode is a free tool that converts text or any file into Base64. It supports every language and emoji, URL-safe output and 76-character line wrapping. Encoding happens in your browser, so your text and files are never uploaded.

How to encode text to Base64

  1. Type or paste text into the left box. The Base64 appears on the right as you type.
  2. Tick URL-safe if the result will go in a URL, filename or JWT.
  3. Click Copy to use the result.

How to convert a file or image to Base64

  1. Click Encode a file and choose any file up to 50 MB.
  2. Copy the plain Base64, or click Copy as data URL to get a ready-to-use value such as data:image/png;base64,… for HTML or CSS.

Examples

How Base64 works

Base64 takes the bytes of your data three at a time (24 bits) and splits them into four groups of 6 bits. Each group becomes one of 64 characters: A–Z, a–z, 0–9, + and/. If the data doesn’t divide evenly into groups of three, = signs pad the end. That is why Base64 is always about a third bigger than the original.

Common uses

Base64 is not encryption

Anyone can decode Base64 instantly with a tool like Base64 Decode. It hides nothing, so never use it to protect passwords, API keys or personal data.

Frequently asked questions

What is Base64 used for?

Base64 turns any data, including images and other binary files, into plain letters and numbers so it can travel safely through systems that only handle text: email attachments, JSON, HTML data URLs, and HTTP headers.

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it instantly, so never use it to hide passwords or secrets.

What does URL-safe mean?

Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant uses - and _ instead and drops the = padding. JWTs and many web APIs use it.

How are emoji and accented letters handled?

Text is converted to UTF-8 bytes first, which is what almost every system expects. That is why "é" becomes "w6k=" rather than causing an error, as the browser’s built-in btoa() would.

Why is the Base64 bigger than my file?

Base64 uses 4 characters for every 3 bytes, so the result is about 33% larger than the original.

Last updated

Missing a feature, or need a tool we don’t have? Suggest it.