Qgenx Tools

Base64 Encoder / Decoder

Encode and decode Base64 strings with full UTF-8 and URL-safe (Base64URL) support locally in your browser with zero uploads.

Runs in your browser
Valid Base64
Encode
Mode
0 B
Input size
0 B
Output size
0%
Size delta

About this tool

Encoding converts your string into UTF-8 bytes via TextEncoder before applying Base64 mapping (and optional Base64URL replacement). Decoding normalizes Base64URL characters, validates padding and alphabet, and decodes UTF-8 bytes with fatal:true error reporting. Inspect HTTP Basic Auth headers and webhook payloads locally.

How to use the Base64 tool

  1. Choose Encode or Decode, then paste your text or Base64 string into the input box.
  2. Tick URL-safe if the result will appear in a web address or a query string.
  3. Read the output box. It updates as you change the input or the options.
  4. Copy the output or use Swap to move it back into the input for a round trip.

What Base64 is and why it exists

Base64 is a way to write bytes using only 64 safe characters: A to Z, a to z, 0 to 9, plus and slash, with equals signs at the end for padding. Systems such as email, JSON and many APIs expect text, so binary data such as a small image or a signature is first converted to Base64. Every three bytes of input become four characters of output, which means encoded text is about a third longer than the original.

Base64 is not encryption. Anyone can decode it, so never use it to hide a password or a secret. It only changes how the data is written down.

A worked example

Encoding the word Qgenx gives the output UWdlbng=. The equals sign is padding, because the input did not divide evenly into groups of three bytes. Decoding UWdlbng= gives back Qgenx. The sample text in the box is longer and shows how the output grows by about a third.

  • Encode a small JSON payload before sending it through a form field that accepts only text.
  • Decode a Base64 string copied from a log file to read the original message.

Who uses Base64 conversion

  • Developers embedding small images or fonts in CSS and HTML as data URIs.
  • API developers passing binary values in JSON or in HTTP headers.
  • Support staff reading encoded values in logs and webhook payloads.
  • Students learning how text and binary are represented on a computer.
  • Anyone who needs to check a value that someone else has encoded.

Tips and common mistakes

  • Decoding text that is not valid Base64 gives an error or garbled output, so check the input for stray spaces or line breaks.
  • Plain text is treated as UTF-8, so accented letters and emoji are encoded correctly.
  • The URL-safe output has no padding. Some decoders require the padding, so add the equals signs back if a strict parser rejects the value.
  • Base64 makes data larger, so avoid it for big files where a binary transfer is possible.
  • Your input stays in your browser. Keys and tokens you encode here are not sent to our server.

Frequently asked questions

No. Base64 is a reversible text encoding for binary or UTF-8 data, not encryption. Anyone can decode Base64 without a key.

Related browser tools