Proje Defteri

πŸ”  Base64 Encode / Decode

Convert text to Base64 or decode Base64 back to text. UTF-8 safe for Unicode and emoji β€” everything runs in your browser, your data never leaves this page.

What is a Base64 Encoder / Decoder?

A Base64 converter turns text or binary data into a string made of only 64 safe ASCII characters (encode) and converts that string back to its original form (decode). It is a daily helper for developers, web designers and system administrators: encoding email attachments (MIME), embedding images in HTML and CSS via data: URIs, inspecting JWT (JSON Web Token) segments, building HTTP Basic Authentication headers and carrying binary data inside text formats such as JSON all rely on it. In this tool every calculation happens in your browser; the text or Base64 data you enter is never sent to a server.

How to use it

  1. To encode: type your text into the Plain text box at the top and click Encode (text β†’ Base64). The result appears in the Base64 box below.
  2. To decode: paste the encoded data into the Base64 box and click Decode (Base64 β†’ text). The decoded text appears in the top box.
  3. Tick the URL-safe option to output - and _ instead of + and / and drop the trailing = padding. Decoding recognises both variants automatically.

Worked example

Encoding the text Hello World πŸ‘‹ produces SGVsbG8gV29ybGQg8J+Riw==. The emoji is encoded correctly because the text is first converted to UTF-8 bytes. Paste that Base64 string into the decode box and you get the exact original text back, emoji included.

Why UTF-8 matters

The browser's built-in btoa() only accepts Latin-1 (single-byte) characters, so it throws an error or produces garbage on text containing accented letters, non-Latin scripts or emoji. This tool first converts text to UTF-8 bytes with TextEncoder before encoding, and reads them back with TextDecoder on decode, so text in any language and emoji convert safely.

Tips

Frequently Asked Questions

What is Base64 and what is it used for?

Base64 is an encoding scheme that turns binary data into text made of only 64 safe ASCII characters. It is used to carry binary data through text-based channels such as email attachments, data-URI images, JWTs and HTTP Basic Authentication. It is not encryption; it is a reversible encoding.

Does it handle Unicode and emoji correctly?

Yes. The tool converts text to UTF-8 bytes (TextEncoder) and then encodes them; on decode the bytes are read back as UTF-8 (TextDecoder). Accented characters, non-Latin scripts and emoji are handled without corruption, unlike a naive btoa(str).

What is URL-safe Base64?

The + and / characters in standard Base64 can break URLs and file names. The URL-safe variant uses - and _ instead and drops the trailing = padding. JWTs and URL parameters typically use this form.

Is my data sent to a server?

No. All encoding and decoding runs entirely in your browser, locally. Your text or Base64 data is never uploaded or stored.