Loona Automation logoLoona Developer Tools
Home › Encoders & Decoders

Text to Base64 Encoder

In short: paste any text — English, Urdu, Arabic, Chinese, emoji — and get its Base64 encoding. The encoder works on the UTF-8 bytes, so every character survives, and an optional URL-safe mode swaps + and / for - and _ for use in URLs and JWTs.
🔒 Private by design: everything runs in your browser on this device. Your input is never uploaded to a server.

Example

Input:

Hello, World!

Output:

SGVsbG8sIFdvcmxkIQ==

About this converter

Base64 represents every 3 bytes of data as 4 characters from a 64-character alphabet (A–Z, a–z, 0–9, + and /), with = padding to a multiple of four. It exists to carry binary or non-ASCII data safely through text-only channels: email (MIME), JSON and XML payloads, data URIs and HTTP Basic authentication. Because the alphabet is small, Base64 output is about 33% larger than the input. Crucially, Base64 is an encoding, not encryption — anyone can decode it instantly, so never treat it as protection for secrets. This encoder first converts your text to UTF-8 bytes (the universal text encoding), which is why accented letters, Arabic-script text and emoji encode correctly instead of turning into question marks.

Frequently Asked Questions

Why does my text grow by about a third when Base64-encoded?

Every 3 bytes become 4 characters, so the output is 4/3 the size of the input — that is the price of using a safe 64-character alphabet.

What is URL-safe Base64?

Standard Base64 uses + and /, which mean other things in URLs. The URL-safe variant replaces them with - and _ and usually drops the = padding; it is the encoding inside every JWT.

Can Base64 encode files, not just text?

Yes — the combined Base64 tool on this site accepts files too. This page is the text-focused version; the file version reads the file locally and never uploads it.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.