How to decode Base64 to ASCII
- Paste the Base64 into Input · Base64. Charset is preset to ASCII.
- Read the text in Output · text. Every byte above 127 appears as
�. - If you see
�, the content is not pure ASCII. Switch Charset to UTF-8 or Windows-1252 to read it. - Copy output or Download the decoded bytes.
To encode plain text the other way, use ASCII to Base64.
Strict ASCII decoding
Many tools read bytes above 127 as some 8-bit charset, so a non-ASCII byte turns into a plausible letter and nobody notices. Here ASCII stops at 127, and every byte from 128 to 255 is shown as the replacement character. The number of � symbols is the number of non-ASCII bytes.
That makes the page a quick test before passing decoded data to a system that only accepts ASCII. A UTF-8 accented letter is two bytes, so it shows as ��; a curly quote is three bytes and shows as ���.
Examples
| Base64 | Bytes (hex) | As ASCII |
|---|---|---|
QVNDSUk= | 41 53 43 49 49 | ASCII |
MjAwIE9L | 32 30 30 20 4F 4B | 200 OK |
YQli | 61 09 62 | a, tab, b |
Y2Fmw6k= | 63 61 66 C3 A9 | caf�� (UTF-8 café) |
4oCcaGnigJ0= | E2 80 9C 68 69 E2 80 9D | ���hi��� (UTF-8 “hi”) |
The last two rows decode correctly with Charset set to UTF-8. The status line’s Looks like field still names the format, so a PNG or PDF is recognized even in ASCII mode; switch back to UTF-8 and the tool links to the matching file decoder.
ASCII in Base64 at a glance
ASCII text has a recognizable Base64 shape. Since every byte is below 80, the first character of each 4-character group is in the range A–f, never g–z, a digit, + or /. Character positions do not map one to one, though: 3 ASCII characters always become 4 Base64 characters, and you cannot decode a substring that does not start on a 4-character boundary.
If you need the code of each character, the byte values are one step away: QVNDSUk= is 65 83 67 73 73 in decimal. Base64 to decimal and Base64 to hex list them, and Base64 to binary shows the bits.
Base64 to ASCII in code
import base64
base64.b64decode("QVNDSUk=").decode("ascii") # 'ASCII'
base64.b64decode("Y2Fmw6k=").decode("ascii")
# UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3
list(base64.b64decode("QVNDSUk=")) # [65, 83, 67, 73, 73]
JavaScript has a trap here: new TextDecoder("ascii") is an alias for Windows-1252 under the WHATWG Encoding Standard, so it decodes Y2Fm6Q== as café and never reports non-ASCII bytes. Check the bytes yourself instead, for example with bytes.every(b => b < 128). More in Base64 in JavaScript and Base64 in Python.
FAQ
How do I convert Base64 to ASCII text?
Paste the Base64 above. Each decoded byte from 0 to 127 is shown as its ASCII character. In Python, base64.b64decode(s).decode("ascii") does the same and raises an error on any byte above 127.
Why do I get � symbols in the output?
Those bytes are not ASCII. Usually the text is UTF-8 with accented letters, curly quotes or emoji; switch Charset to UTF-8 to read it. If most of the output is �, the data is probably a file.
How do I get the ASCII codes as numbers?
Use Base64 to decimal for byte values like 65 83 67 73 73, or Base64 to hex for 41 53 43 49 49.
Can ASCII text contain invisible characters?
Yes: tab, carriage return, line feed and the other control codes 0–31 are ASCII. They decode normally, so a tab between words is kept as a tab.