Encode text to Base64

turns any UTF-8 or ASCII text into Base64, ideal for systems that only accept ASCII payloads

Why encode text in base64?

Base64 encoding is used to represent binary data or text as ASCII character strings. This is especially useful for transmitting data via protocols that do not support certain types of characters or that require a text representation of the data.

Features of the base64 encoding tool

This tool allows you to easily encode text in base64. You can encode simple character strings or binary data (such as images) to transmit them securely or integrate them into formats that only accept text data.

How to use the base64 encoding tool

On the encoding page, you can enter the text you want to encode into the dedicated text area. Click the encode button to generate the base64 representation of the text.

Once the text is encoded in base64, the corresponding base64 string will be displayed in a result area. You can copy this base64 string to use in your projects or applications.

Example of base64 text encoding

Here is an example of encoding a text string "Hello, world!" in base64:


Qm9uam91ciwgbW9uZGUgIQ==

    

Frequently asked questions

What is base64 for?

It is an encoding that transforms any binary data into a string of 64 printable ASCII characters. This allows passing "raw" data through channels that only support text: HTML, JSON, XML, or the body of an email.

Is base64 encoding a form of compression?

No, on the contrary: base64 encoding increases the size of the data by approximately 33%. For every 3 bytes of binary data, base64 uses 4 ASCII characters. It should therefore be used for its compatibility, not for saving space.

Does it support accents and special characters?

Yes, as long as the text is encoded in UTF-8 before being transformed into base64. Our tool handles UTF-8 correctly, allowing you to encode any international text, emojis included.

Is my data secure when I encode it here?

Encoding is processed on our server for the duration of the request and the data is not kept. However, base64 is not a form of security or encryption: any base64 string is easily decodable. For sensitive data, use an encryption tool.

What is the maximum size for encoding?

The tool is optimized for strings of a few thousand characters. For very large files (several MB), prefer using a command-line tool like base64 to avoid browser and server timeouts.

Example request

curl -X POST https://cdrn.fr/api/v1/tools/base64-text-encoder/execute \
  -H "Content-Type: application/json" \
  -d '{"text":"..."}'

Input schema

Field Type Required Default
text string

Endpoints

  • GET https://cdrn.fr/api/v1/tools - lists every available tool
  • GET https://cdrn.fr/api/v1/tools/base64-text-encoder - returns the schema for this tool
  • POST https://cdrn.fr/api/v1/tools/base64-text-encoder/execute - runs this tool with a JSON payload