Skip to content
XUtilHub

Base64 Encode & Decode Text Online

Encode text to Base64 or decode Base64 to text, with full UTF-8 and emoji support and a URL-safe option. Free and private.

  • Free, no sign-up
  • Runs in your browser, nothing uploaded
Input
Output

About the Base64 Encode / Decode

Encode any text to Base64 or decode Base64 back to readable text. Unicode and emoji are handled correctly via UTF-8, and URL-safe Base64 (Base64url) is supported.

Key features

  • Encode text to Base64 and decode Base64 to text
  • Full UTF-8 support: accents, non-Latin scripts and emoji
  • URL-safe Base64 (Base64url) without padding
  • Decoding accepts missing padding and line breaks
  • Encode or decode each line separately
  • Runs locally in your browser

Encode and decode Base64 text

Base64 turns any data into a string made of 64 safe characters (A–Z, a–z, 0–9, + and /). It's used to embed data in JSON, emails, data URLs, HTTP Basic authentication headers and JSON Web Tokens.

Examples

TextBase64
HelloSGVsbG8=
Hello, World!SGVsbG8sIFdvcmxkIQ==
caféY2Fmw6k=
👋8J+Riw==

Text is converted to UTF-8 bytes before encoding, which is the standard used by web APIs. That's why café and emoji round-trip correctly.

Standard vs URL-safe

VariantCharacters 62 and 63PaddingUsed in
Standard (RFC 4648 §4)+ /=Email (MIME), data URLs, most APIs
URL-safe (RFC 4648 §5)- _Usually omittedURLs, JWTs, file names

The decoder accepts both variants automatically.

Common uses

  • HTTP Basic auth: Authorization: Basic + Base64 of user:password (encoded, not encrypted, so always use HTTPS).
  • Data URLs: data:text/plain;base64,SGVsbG8=.
  • JSON payloads that need to carry small binary values.
  • Inspecting tokens: the parts of a JWT are Base64url-encoded JSON.

Convert images with Image to Base64 and Base64 to Image, decode tokens with the JWT Decoder, or encode JSON with JSON to Base64.

How to use the Base64 Encode / Decode

  1. Type or paste your text into the input box.
  2. Choose the options you want.
  3. The result updates instantly as you type.
  4. Copy the output or download it as a .txt file.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding that anyone can reverse instantly. Never use it to hide passwords or secrets.

Why is the Base64 output longer than my text?

Base64 represents every 3 bytes with 4 characters, so encoded data is about 33% larger, plus up to two = padding characters.

What is URL-safe Base64?

A variant (Base64url) that replaces + with - and / with _ and usually drops the = padding, so the result can be used in URLs, file names and JWTs without escaping.

Why does decoding say the result isn't valid text?

The Base64 probably contains binary data, such as an image or a ZIP file, rather than text. For images, use the Base64 to Image tool.

Is my text sent anywhere?

No. All text tools run locally in your browser.

Do these tools support Unicode?

Yes. They handle Unicode text, including emoji and accented characters.

Last updated:

Related Text tools