# Base64 Encode - Text to Base64

URL: http://103.76.183.74:8106/base64-encode

Encode text to Base64 online for free. UTF-8, UTF-16 and Latin-1, URL-safe output, MIME line breaks and live conversion. Private: runs in your browser.

Paste any text - English, Thai, emoji, JSON, XML, code - and get its Base64 form instantly. Choose the character set the receiving system expects, make the result URL-safe or wrap it at 76 characters for e-mail (MIME).

## How to use it

1. Paste or type your text in the Input box.
2. Pick options if you need them: character set (UTF-8 is right in most cases), URL-safe, no padding, line breaks.
3. Copy the Base64 result or download it as a .txt file.

Everything runs in the browser: the data is never uploaded to Base64 Studio.

## Questions

### Which character set should I choose?

UTF-8 for almost everything on the web and in APIs. UTF-16LE is what Windows and .NET use internally; Latin-1 (ISO-8859-1) only for old systems that expect one byte per character.

### What does URL-safe Base64 mean?

It replaces + with - and / with _ so the result can go into a web address or file name without escaping. It is also called base64url (RFC 4648 section 5) and is used in JWT tokens.

### What are MIME line breaks?

E-mail standards (MIME) limit lines to 76 characters. Turn on line breaks when the Base64 goes into an e-mail or a PEM file (64 characters).

### Is my data uploaded to a server?

No. Every conversion on this page runs inside your browser with JavaScript. Your text and files never leave your computer, which is why it also works for private keys, contracts and photos.

### Is the tool free?

Yes, free without sign-up and without limits other than your computer's memory. The site is paid for by the small ads on the left and at the bottom.

## Same thing with the API

```bash
curl -s -X POST http://103.76.183.74:8106/api/v1/encode -H 'Content-Type: application/json' -d '{"text":"Hello world"}'
```

## Related tools

- [Base64 Decode - Base64 to Text](http://103.76.183.74:8106/base64-decode)
- [Base64URL Encoder, Decoder and Converter](http://103.76.183.74:8106/base64url)
- [File to Base64 Converter](http://103.76.183.74:8106/file-to-base64)
- [Base64 to Hex and Hex to Base64 Converter](http://103.76.183.74:8106/base64-to-hex)
