Swelıty
Tools for everyone

Free Online Base64 Encoder

Encode plain text to Base64 format.

Input size: 25 characters.

Plain text input

Output

Encoded to Base64. Output size: 52 characters.

How to use

  1. Type or paste your text, or open a text file into the input box.

  2. Press Encode.

  3. Copy the Base64 string, or download it as base64-encoded.txt.

  4. Use the switch above the editor to open the Base64 Decoder and check the result.

Why use this tool

  • UTF-8 first

    Any Unicode text is encoded from its UTF-8 bytes, which avoids the errors that plain btoa gives for characters such as emoji.

  • Standard alphabet

    The output uses + and / and keeps the = padding.

  • Size shown

    The tool shows how many characters went in and came out.

About this tool

Base64 Encoder turns text into a Base64 string. Base64 writes data with 64 safe characters (letters, digits, + and /, with = as padding), so it can travel through systems that expect plain ASCII, such as data URLs, HTTP Basic authentication headers, JSON fields and configuration files. Your text is first converted to UTF-8, so accented letters, other alphabets and emoji come back unchanged when you decode them. The page opens with an example already encoded.

Frequently asked questions

No. It is only a way of writing data. Anyone can decode it without a key, so it does not protect a password or token.

Every 3 bytes become 4 characters, so the result is about a third larger than the UTF-8 text.

The tool makes standard Base64. For the URL-safe form, replace + with - and / with _, and remove the = signs if the system you use expects that.

This tool is for text. Use Image to Base64 for pictures.

Check for a new line at the end of the text. Some commands, such as echo, add one, and it is encoded along with everything else. Text typed here with only spaces is rejected as empty.