b4rn1 · devtoolsdeveloper
Bin DV-02·Developer

Base64 encoder

Encode text or a file to Base64, or decode Base64 back to text or a downloadable file. Handles UTF-8 correctly.

BinDV-02
DepartmentDeveloper
Free runsUnlimited
Runs onYour device
Loading the tool…

The code for this tool is fetched only when you open it.

What base64 encoder does

Base64 encoder converts text or a file to Base64 and back, with correct handling of UTF-8 and binary data. It is for data URLs, Authorization headers, embedded assets and the payload that has to travel through a channel that only accepts text.

How it works

TextEncoder to UTF-8 bytes, then a binary string through btoa, with a chunked path for large buffers so a multi-megabyte file does not blow the argument limit. Decoding reverses it and rebuilds the text with TextDecoder.

Runs on your device

The file never leaves this tab. It is decoded by the browser, worked on in memory and encoded again — no request carries it, and there is no server-side copy to delete afterwards because none is made.

Formats and limits

LimitsNo text limit; file encoding is bounded by the tab's memory. Base64 adds 33% to the payload size, which is inherent to the encoding and not an inefficiency here.
PriceFree, unlimited, no account

Worth knowing

  • The UTF-8 path is the part most online encoders get wrong: btoa alone throws on any character above U+00FF, so an accented name or an emoji breaks a naive implementation.
  • Decoding tolerates missing padding and URL-safe characters (- and _), which is what you get from a JWT segment or a URL parameter.

Questions about base64 encoder

Is Base64 encryption?

No. It is a reversible encoding with no key — anyone can decode it. It exists to move binary data through text channels, nothing more.

Why is the encoded string a third larger?

Base64 represents every three bytes as four ASCII characters, so the output is 4/3 of the input. That overhead is the price of staying inside printable ASCII.

Why did a naive encoder fail on my text?

Because btoa only accepts Latin-1. This tool converts to UTF-8 bytes first, so accented characters, emoji and CJK text encode correctly.

Does it handle emoji and accents?

Yes. Text is encoded as UTF-8 before Base64, which is what the web expects.

Why is the Base64 bigger?

It packs 6 bits per character instead of 8, so the result is about a third longer than the input.

Is my file uploaded anywhere?

No. There is no upload step and no server-side copy: the browser decodes and re-encodes the file in this tab, and the network carries nothing about it.

Does it work offline?

Once the page has loaded, yes — the processing code runs locally and no further request is needed. The first load has to come from the network like any page.

Is it free, and do I need an account?

Free with no account and no daily limit — counting and calculating are not metered, because they cost nothing to run.

Base64 encode and decode — text and files, offline · b4rn1