Which text tool do I need
Most text tools are the same encoder and decoder opened with a different preset, so the choice is about starting in the right place.
| Your task | Tool |
|---|---|
| Turn text into Base64 | Base64 encoder or Text to Base64 |
| Read a Base64 string | Base64 decoder or Base64 to text |
| Emoji or non-Latin scripts, byte-exact UTF-8 | UTF-8 to Base64, Base64 to UTF-8 |
| Windows, .NET or PowerShell wide strings | UTF-16 to Base64, Base64 to UTF-16 |
| Plain 7-bit text only | ASCII to Base64, Base64 to ASCII |
| Check whether a string is valid Base64 | Base64 validator |
| Fix line breaks, quotes, missing padding or mixed alphabets | Repair Base64 |
| Lines of 76 characters for email | MIME Base64 encoder |
| Base64 that holds JSON, XML, HTML or CSV | Base64 to JSON, Base64 to XML, Base64 to HTML, Base64 to CSV |
| Encode markup for a data URI or API | HTML to Base64, XML to Base64 |
| Predict the encoded length | Base64 size calculator |
Why the charset matters
Base64 works on bytes and knows nothing about characters. Before text can be encoded it has to be turned into bytes, and the charset decides how:
| Text | UTF-8 | Windows-1252 | UTF-16LE |
|---|---|---|---|
é | w6k= | 6Q== | 6QA= |
Grüße | R3LDvMOfZQ== | R3L832U= | RwByAPwA3wBlAA== |
UTF-8 is the right default for the web, JSON and most APIs. UTF-16LE is what Windows APIs and PowerShell’s -EncodedCommand expect. Legacy charsets turn up in old databases, CSV exports from desktop software and some email. When decoded text shows é instead of é, it was UTF-8 read as Windows-1252; switch the charset in the decoder and the text comes out right.
When the decoded text looks wrong
- Random symbols and boxes: the Base64 holds binary data, such as an image, a PDF or gzip output. Use Base64 to file or, for
H4sI…strings, the gzip decoder. - An error about invalid characters or length: the string was damaged in transit. The validator shows where, and Repair Base64 cleans the usual culprits.
- It decodes, but to more Base64: the data was encoded twice. Decode the output again.
-and_in the string: this is Base64URL, from a JWT or URL. All decoders here accept it; the Base64URL tools explain the difference.
For tokens, URLs and structured payloads like SAML or Kubernetes Secrets, see the web and token tools. For other encodings such as Base32, Base58 or hex, the base converter reads them all.
FAQ
Which tool should I use to decode a Base64 string?
Start with the Base64 decoder. If the output is unreadable, the data is probably a file or compressed, and Base64 to file detects the type. If the text has wrong accents, change the charset.
Why does the same text give different Base64 in different tools?
Base64 encodes bytes, and the text becomes bytes through a charset first. é is w6k= from UTF-8, 6Q== from Windows-1252 and 6QA= from UTF-16LE. Match the charset the other side uses.
Do I have to clean up the string before decoding?
Usually not. The decoders ignore whitespace and line breaks, strip quotes and a data:…;base64, prefix, accept URL-safe characters and restore missing padding, and the status line says what was fixed. For badly damaged input use Repair Base64.