Text to Base64 Converter

Encode text to Base64 with correct UTF-8 handling, one blob or one line at a time.

Text
Base64
Runs locally in your browser

About the Text to Base64 Converter

Anywhere a value has to survive a channel built for plain ASCII, Base64 is the usual answer: HTTP basic authentication headers, email attachments, embedded certificates, credentials in a container manifest. This converter takes the text you paste, reads its UTF-8 bytes, and writes the encoded form.

The per line switch is the difference from a plain encoder. Tick it and each line is encoded on its own, producing one Base64 value per row, which is what you need when you are populating a column in a spreadsheet, filling a list of secrets in a manifest, or preparing test fixtures. Leave it off and the whole input including its newlines becomes a single value.

Two more settings shape the output. The URL-safe alphabet replaces the characters that would otherwise need percent-encoding in a query string, and drops the padding. Wrapping at 76 characters gives the MIME layout expected in mail headers, while 64 matches the PEM convention. Non-ASCII text is fully supported, so an address with a Turkish dotless i or a name in Greek encodes and decodes without loss.

Base64 is reversible by anyone, so it hides nothing. For a real one way transformation use All Hash Generator, and to read an encoded value use Base64 to Text.

How to use

  1. Type or paste the text you want to encode.
  2. Tick Encode each line separately if you need one Base64 value per row.
  3. Add the URL-safe alphabet or a wrap width if the destination needs it, then copy the output.

Common questions

Why does the output end in one or two equals signs?
That is padding, added when the input length is not a multiple of three bytes. The URL-safe option removes it.
How do I build a basic authentication header?
Encode user:password as a single line, then send it as Authorization: Basic followed by the result.
Does per line mode keep empty rows?
No. Blank lines are skipped so the output has no empty values in it.
Is emoji supported?
Yes. Text is encoded from its UTF-8 bytes, so astral characters such as emoji round trip correctly.