Base64 Encode/Decode
Encode text or files to Base64 and decode Base64 back to text, images or files. UTF-8 safe, URL-safe option, data URIs, all in your browser.
Encode text or files to Base64 and decode Base64 back to text, images or files. UTF-8 safe, URL-safe option, data URIs, all in your browser.
About this tool
Base64 Encode/Decode converts between ordinary data and Base64, the encoding that represents any bytes using only 64 safe characters (A–Z, a–z, 0–9, + and /). Base64 is used wherever binary data has to travel through systems built for text: email attachments, data: URIs that embed images in HTML and CSS, JSON web tokens, API payloads, and basic authentication headers. To encode, type or paste text: it is converted to UTF-8 first, so Hindi, Chinese, accented letters and emoji all encode correctly (the common browser shortcut fails on them). You can also drop any file up to 20 MB, such as an image or PDF, to get its Base64 text and a ready-to-use data URI. Options give you the URL-safe alphabet (- and _ instead of + and /, without = padding), used in URLs, file names and JWTs, and line wrapping at 76 characters, used in email (MIME). To decode, paste Base64 or a complete data URI. Both alphabets are accepted, missing padding and line breaks are fixed automatically, and invalid input gets a clear explanation. If the result is readable text it is shown and can be copied; if it is an image (PNG, JPG, GIF or WebP) you see a preview; and any result, such as a PDF or ZIP, can be downloaded as a file with the right extension. Remember that Base64 is an encoding, not encryption: anyone can decode it, so never use it to hide passwords or secrets. Encoded data is also about a third larger than the original. Everything runs in your browser.

Switch between the two modes at the top.
Any text, or a file up to 20 MB to encode.
URL-safe alphabet and 76-character line wrapping.
Copy the result, use the data URI, or download a decoded file.
Hindi, emoji and accents encode correctly.
Encode images or PDFs and embed them.
For URLs, file names and JWTs.
Both alphabets, missing padding and data URIs handled.
See decoded images; download any decoded file.
Nothing leaves your browser.
Encode, embed and debug
Inline icons in HTML or CSS as data URIs.
ExampleEncode a 2 KB PNG icon and paste the data URI into a stylesheet.
Read encoded payloads and headers.
ExampleDecode the middle part of a JWT to see its claims.
Attachments are sent as Base64 with 76-character lines.
ExampleDecode an attachment copied from a raw email source.
Turn Base64 from logs or databases back into files.
ExamplePaste a Base64 PDF from an API response and download it.
Know what it is for
Base64 adds about 33%. Keep data URIs for tiny icons.
+ and / have special meanings in URLs; the URL-safe alphabet avoids them.
Senior Software Engineer · Developer of Toolyconvert
Hemant developed Base64 Encode/Decode and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.
Last updated 23 November 2026
Featured on
Toolyconvert is listed on these product directories and launch platforms.