What is Base64 encoding?
A way to write any data, even images and files, as plain text using 64 characters, so it passes safely through email and code.
Paste Base64 to decode it to text, an image or a file, or pick Encode to turn text and files into Base64 as you type.
Base64 to text or a file
Both are read when decoding
Paste Base64, drop a file or open one to start.
The decoded text shows here as you paste, ready to copy or download.
Decode Base64 online to readable text, hex bytes or the original file, and encode text or any file back to Base64.
Free with no sign-up and no limit, for tokens, email attachments, API responses and images in HTML or CSS.
Decode a Base64 string, look inside it and encode new text in three steps.
Paste a Base64 string or a data URI into the left box, or open a .txt file. The decoded text shows on the right.
Switch between Text, Hex and File. A picture or PDF inside the Base64 shows in File, ready to save to your device.
Pick Encode, then type text or open any file to get its Base64. Copy it, download it, or turn on URL safe for links.
Base64 writes any data with 64 safe characters: A to Z, a to z, 0 to 9, plus + and /. Every 3 bytes become 4 characters, so the text is about a third longer than the file, but it survives email, JSON, URLs and HTML untouched.
When the data does not split evenly into 3 byte groups, the end is padded with one or two = signs. The decoder here adds missing padding for you, skips spaces and line breaks, and names the line and column of any character that does not belong.
URL safe Base64, also called base64url, swaps + and / for - and _ and drops the padding, so the string can sit in a web address or a file name. JSON Web Tokens use it. Both kinds decode here without changing a setting.
Base64 often hides a whole file: a logo in an HTML page, a PDF in an API response, an attachment in an email. The decoder reads the first bytes, names the type, such as PNG, JPG, GIF, WebP, SVG or PDF, and shows the picture in the File tab.
Download saves the file with the right ending, so base64 to PDF or base64 to PNG takes one click. A data URI such as data:image/png;base64, works too: the prefix is read for the type and removed before decoding.
Going the other way, open any image or file in Encode to get its Base64. The Data URI tab writes it ready to paste into an img src or a CSS background, so a small icon needs no separate file.
Decodes to UTF-8, so accents, Chinese, Arabic and emoji come out as written, not as broken symbols.
See the decoded bytes as hex pairs, useful for keys, hashes and binary data that is not text at all.
Open a PNG, JPG, SVG or any picture to get its Base64 and a data URI ready for HTML, CSS or JSON.
Paste Base64 from an API or an email and save the PDF inside it, with pages and fonts unchanged.
Encode with - and _ and no padding for links, tokens and file names. Decoding reads both alphabets.
A character that does not belong is named with its line and column, so a broken copy is easy to fix.
Every string and file is decoded on your device. Nothing is sent to a server or saved to a link.
Decoding, encoding and file previews run in your browser. Your tokens and files never go online.
Only the text you type is remembered, in this browser, for your next visit. Files are never kept.
A free Base64 decoder and encoder with no sign-up, no email and no limit on how often you use it.
A way to write any data, even images and files, as plain text using 64 characters, so it passes safely through email and code.
No. Base64 has no key, so anyone can decode it in a second. Never use it to hide passwords; use real encryption for that.
Run echo 'SGVsbG8=' | base64 --decode in a terminal, or base64 -d file.txt for a file. On a Mac, base64 -D works too.
Import base64, then call base64.b64decode(text). Add .decode('utf-8') to get a string instead of bytes.
Call atob(text) for plain ASCII. For accents and emoji, read the bytes with Uint8Array.fromBase64(text), then TextDecoder.
The = signs are padding. They fill the last group of 4 characters when the data is 1 or 2 bytes short of a full 3 byte group.
Paste the Base64 above and open the File tab. The picture shows there, and Download saves it as a PNG, JPG or GIF file.
A to Z, a to z, 0 to 9, + and /, with = for padding. URL safe Base64 uses - and _ in place of + and /.
Still stuck, or found a problem? Email dobliquestudio@gmail.com and we will help.