Skip to content

Encode text to Base64

Encode any text to Base64 directly in your browser, with full support for UTF-8 characters.

Processed on your device. Nothing is sent to any server.

Converts the text to UTF-8 bytes and encodes them in Base64, the standard format for representing binary data as safe ASCII text.

Use cases

  • Encoding credentials for a basic authentication header.
  • Preparing text to embed in a JSON or XML.
  • Generating Base64 test data for an API.

How it works

  1. 1

    Type your text

    Type or paste the text you want to encode.

  2. 2

    Encode it

    Click Encode and copy the result.

Technical details

  • Example: "Hello" encodes as SGVsbG8=; "café" as Y2Fmw6k=, because "é" takes 2 bytes in UTF-8.
  • The result is roughly 33% larger than the original text. Base64 isn't encryption: anyone can decode it.
  • It produces standard Base64 (with + and /). JWTs and URLs use the Base64URL variant, which replaces those characters with - and _ and usually drops the trailing =.
  • It encodes text; to turn an image into Base64, use the image to Base64 tool.

Frequently asked questions

Does it work with accented and special characters?

Yes, the text is first encoded to UTF-8 before converting it to Base64, so special characters encode and decode correctly.

← Developer