Loading tool...

How to Convert UTF-8 to Base64 - Step by Step Guide

Step 1

Enter UTF-8 Text

Start by typing or pasting your UTF-8 text into the input area. Emoji and international characters are all handled through their UTF-8 bytes.

•
Type or paste: Enter any text, in any language
•
Full Unicode: Emoji, Chinese, Arabic and the rest all encode cleanly
•
Try sample: Click "Sample" to load an example line with an emoji
Step 2

Automatic Encoding

The tool encodes your text to Base64 about a second after you stop typing. It encodes the UTF-8 bytes, not the raw characters, which is why the result decodes back without garbling accents.

•
Encodes as you type: No button to press
•
Multi-byte safe: Each character's UTF-8 bytes are encoded correctly
•
Standard alphabet: RFC 4648 Base64 with = padding
Step 3

Copy or Download Result

Once encoded, copy the Base64 string to your clipboard or download it as a text file for use in an API payload, email, or wherever you need plain text.

•
Copy to clipboard: One-click copying for quick use
•
Download output: Save as a text file
•
Runs in your browser: Your text is not sent to our server

What is UTF-8 to Base64 Encoding?

UTF-8 is how text is stored on the modern web: each character becomes one to four bytes. Base64 then repackages those bytes into a string of plain A-Z, a-z, 0-9, + and / characters, so international text can travel through channels that only like ASCII — JSON APIs, email, data URIs and the like.

The order matters: encoding the characters directly (as a bare btoa() call does) breaks on anything past Latin-1. Encoding the UTF-8 bytes, the way this tool and the TextEncoder API do, keeps every emoji and accent intact.

Frequently Asked Questions

How do I encode UTF-8 to Base64?

Type or paste your UTF-8 text into the left panel. About a second after you stop typing, the Base64 shows up on the right. For example, José 😀 becomes Sm9zw6kg8J+YgA== and decodes back exactly.

Why doesn't JavaScript's btoa() work on this text?

btoa() only accepts Latin-1 characters, so it throws an error on emoji or CJK, and it turns an accented letter like é into a single byte. Decode that byte as UTF-8 and you get mojibake — José comes back as José. This tool first encodes your text as its UTF-8 bytes (the way TextEncoder and the base64 command do), then Base64-encodes those bytes, so the result survives the round trip.

Why is the Base64 longer than my text?

Two reasons. UTF-8 stores many characters as more than one byte — a letter with an accent is 2 bytes and an emoji is usually 4 — and Base64 then adds about a third on top, because it packs every 3 bytes into 4 printable characters. So a short line with an emoji can look surprisingly long once encoded.

Can I encode emoji and other languages?

Yes. UTF-8 covers the whole Unicode range, so emoji (😀), Chinese (中文), Arabic (العربية) and anything else all encode cleanly and decode back to the same text. If half of an emoji is missing from your text (a lone surrogate), UTF-8 can't hold it, so it is encoded as the replacement character and a short note tells you.

Is my text uploaded anywhere?

No. The encoding runs in your browser, the text is never sent to our server, and nothing is kept once you leave — a reload starts with an empty editor. Remember that Base64 is only an encoding, not encryption: anyone can decode it, so it does not hide passwords or other secrets.

Is this converter free?

Yes, it's free and there's nothing to sign up for. Very long text can take a moment because the whole result has to fit in the editor.