How to use Base64 encode & decode
- 1
Choose Text or File, and for text choose Encode or Decode.
- 2
Type or paste your text or Base64, or choose a file to encode. The result appears straight away.
- 3
Pick the standard or URL-safe alphabet, and turn padding or 76-character line wrapping on or off.
- 4
Copy the result, or download it. Decoded Base64 can be saved as a file, with the type detected where possible.
What this tool does
This tool converts between plain data and Base64 text. Encode a string or any file (an image, a PDF, a font) into Base64 or a complete data: URL, or paste Base64 to get the original text or file back.
Features
- UTF-8 text in both directions. Emoji and every script round-trip correctly.
- Standard and URL-safe alphabets, with optional
=padding. - MIME line wrapping at 76 characters for email and PEM-style output.
- Files to Base64 or data URL, ready to paste into HTML, CSS or JSON.
- Base64 to file. Downloads the decoded bytes, named from the data URL type or the file's signature (PNG, JPEG, GIF, WebP, PDF, ZIP and more).
- Precise errors. Line, column and the offending character.
Limits
- Base64 output is about a third larger than the original. Very large files (tens of megabytes) produce text so long that the page may become slow.
- The file type of decoded data is guessed from its first bytes; unknown types are saved as
.bin. - Line wrapping uses a plain line feed between lines.
Where your text is processed
This tool works in your browser: what you type or paste is processed on your own device, so it isn't sent to our server for this tool. Some other tools on UtiloNest do use our server, and their pages say so.
Frequently asked questions
What is Base64 used for?
Base64 represents any bytes using 64 safe characters (A–Z, a–z, 0–9, + and /). It is used to put binary data where only text is allowed, for example email attachments, data URLs in HTML and CSS, JSON payloads, HTTP Basic authentication headers and the parts of a JSON Web Token.
What is the difference between Base64 and Base64URL?
Base64URL (RFC 4648, section 5) replaces + with - and / with _, and usually drops the = padding, so the result can sit in a URL or filename without further escaping. JWTs use it. When decoding, this tool detects either alphabet automatically.
Why does my decoded text show strange characters in other tools?
Text has to be turned into bytes before encoding, and many simple tools do this wrongly for anything beyond basic Latin letters. This tool always uses UTF-8, so emoji, accents, Urdu, Arabic and Chinese decode back exactly. If the decoded bytes are not valid UTF-8 (an image, for example), you'll be offered a file download instead.
What do the error messages mean?
The decoder reports the line and column of the first problem. It can be a character that isn't in the Base64 alphabet, = padding in the middle or too much of it, a length that can't be valid Base64, or a mix of the standard and URL-safe alphabets. Spaces and line breaks are ignored, so wrapped Base64 decodes fine.
Is Base64 encryption?
No. Base64 is an encoding, not a cipher. Anyone can decode it without a key, so never rely on it to hide passwords or personal data.
Where is my text processed?
In your browser. This tool works on your own device, so what you type isn't sent to our server for it.