Toolvist

Text to Base64 / Base64 to Text

Encode text to Base64 or decode Base64 to text.

Free Text ⇄ Base64 Converter

The Text to Base64 tool encodes text into Base64 or decodes Base64 back into text. It handles UTF-8 characters correctly and runs.

Standard Base64 breaks URLs and filenames, so use URL-Safe Base64 for those. To see the same bytes in binary or hex, the Text to Binary and Base64 to Hex converters show the raw form.

How to use the Text ↔ Base64

  1. 1 Paste the text you want to encode into the input box.
  2. 2 The Base64 output appears immediately, correctly UTF-8 encoded first.
  3. 3 Switch to decode mode and paste a Base64 string to read it back as text.
  4. 4 Copy either direction with the button beside the output.

RFC 4648 Base64 data representation and binary safety

The Base64 Encode and Decode tool translates text and binary octets into safe ASCII characters according to RFC 4648. It groups 24 bits of input data (3 bytes) into four 6-bit chunks, mapping each chunk to a 64-character alphabet comprising uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), and the symbols + and /.

Base64 ensures that arbitrary binary data and non-ASCII character sets travel across legacy 7-bit transmission channels (such as MIME email bodies and HTTP headers) without being corrupted or misinterpreted by line-ending conversions or control code filters.

  • Encodes arbitrary text and binary streams into standard 64-character ASCII strings.
  • Applies standard RFC 4648 padding syntax using trailing equals signs (=).
  • Facilitates embedding data within JSON payloads, XML tags, and HTTP headers.
  • Provides instant two-way encoding and decoding with automatic format validation.

Frequently asked questions

Does Base64 encrypt my data?

No, and this matters. Base64 is a reversible encoding with no key — anyone can decode it instantly. It exists so binary data can travel through text-only channels; it provides no confidentiality whatsoever.

How are accented and non-Latin characters handled?

The text is converted to UTF-8 bytes before encoding, so "café" and Japanese text round-trip correctly. Encoding raw JavaScript string characters without that step is a common bug that corrupts anything outside ASCII.

Why does Base64 output end with one or two equals signs?

That is padding. Base64 works in blocks of three bytes producing four characters; if the input is not a multiple of three, "=" fills the gap so the length stays a multiple of four. Padding carries no data.

Related Security & Cryptography Tools

Browse all Security & Cryptography Tools →

You might also need

Tools from other categories that people pair with the Text ↔ Base64:

Browse the full tool directory →