Skip to content
GAMETROZ

Base64 Encoder & Decoder

Encode text to Base64 or decode it back, with correct UTF-8 handling and a URL-safe option.

Processed locally in your browser.

About Base64 Encoder & Decoder

Base64 turns bytes into plain ASCII letters, digits and a few symbols, so data can travel through systems that only accept text: email bodies, JSON fields, data URLs, HTTP headers. It is an encoding, not encryption, so anyone can reverse it.

Text is converted to UTF-8 before encoding, so café, 日本語 and emoji come out right, which the browser's built-in btoa cannot do on its own. Decoding accepts standard and URL-safe input, with or without padding, and tells you exactly where invalid input goes wrong. It works the same on a phone.

How to use Base64 Encoder & Decoder

  1. 1Choose Encode or Decode.
  2. 2Type or paste your text or Base64 string.
  3. 3For tokens and URLs, turn on the URL-safe alphabet, and drop the = padding if you need to.
  4. 4Copy the result, or use Swap to run the output back through the opposite direction.

Examples

Input

Hello, Gametroz!

Result

SGVsbG8sIEdhbWV0cm96IQ==
Plain ASCII text, standard alphabet.

Input

Café ☕

Result

Q2Fmw6kg4piV
The accent and the emoji are encoded as UTF-8 bytes.

Input

SGVsbG8*

Result

Invalid character "*" at position 8. Base64 uses A-Z, a-z, 0-9, + / (or - _) and = padding.
Decoding reports the first character that does not belong.

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 only changes how data is written, and anyone can decode it in one step. Never use it to hide passwords or secrets; use real encryption for that.

What is URL-safe Base64?

The standard alphabet uses + and /, which have special meaning in URLs. The URL-safe variant swaps them for - and _ and often drops the trailing = padding, which is why JWTs and many tokens look the way they do.

Why does decoding say the bytes are not valid UTF-8?

The Base64 itself is fine, but it does not hold text. It probably encodes binary data such as an image or a compressed file, which cannot be shown as readable characters.

Guides

Tools guide

How to Format, Minify and Validate JSON

Make messy JSON readable, shrink it again for production, and find the exact line and column of a syntax error, with the five mistakes behind most failures.

· 3 min read

Tools guide

Best Free Online Developer Tools

A tour of the free developer and generator tools in the Gametroz catalog: JSON, Base64, URL, timestamps, hashes, UUIDs, passwords, QR codes and more.

· 3 min read