ASCII to Base64 Converter

Encode plain ASCII text as Base64, with a strict switch that catches smuggled non-ASCII characters.

ASCII text
Base64
Runs locally in your browser

About the ASCII to Base64 Converter

ASCII covers code points 0 to 127: the letters, digits, punctuation and control codes that every protocol on the internet agrees on. Base64 was designed to carry exactly that kind of payload through channels that only tolerate printable characters, which is why request bodies, basic authentication headers and SMTP attachments all lean on it.

Paste your text and the encoded form appears immediately. The strict checkbox is the part worth knowing about. Text copied out of a word processor or a chat window often carries a curly apostrophe, an ellipsis character or a non-breaking space that looks identical to the ASCII version on screen. With strict mode on, the tool refuses to encode and names the offending characters, so you can clean them before the payload reaches a system that assumes one byte per character.

With strict mode off those characters are encoded as UTF-8, which is what almost every modern receiver expects, and the status line counts how many of them there were. The URL-safe checkbox swaps the plus and slash characters for hyphen and underscore and drops the padding, matching the alphabet used in tokens and query parameters. Wrapping at 76 characters produces the block shape that mail headers want.

When you need the opposite direction use Base64 to ASCII, and for a general text encoder that never questions your characters use Text to Base64.

How to use

  1. Paste or type the ASCII text into the left pane.
  2. Tick Reject characters above code point 127 when the receiving system is strictly single byte.
  3. Choose the URL-safe alphabet or a wrap width if the destination needs one.
  4. Copy the Base64, or use Download to save it as a text file.

Common questions

What counts as ASCII here?
Code points 0 through 127, which includes tabs and newlines. Anything above that range is reported by strict mode.
Why did my text fail the strict check?
Usually a smart quote, an en space or an ellipsis pasted in from a document. They look like ASCII but occupy higher code points.
Does encoding change the line endings?
No. Whatever line endings you paste are encoded byte for byte, so a CRLF stays a CRLF after a round trip.
Is the output safe to put in a URL?
Only with the URL-safe alphabet ticked. The standard alphabet uses plus and slash, which both need percent encoding in a query string.