🔒 Runs in your browser. Nothing is uploaded or stored.
Encode text or files to Base64, or decode Base64 back to readable text or the original file. Supports UTF-8 and other character sets, URL-safe Base64 and MIME line breaks. Free, with no sign-up and no limits.
Turn an image, PDF or any file into a Base64 string or a ready-to-use data URI.
Paste Base64 or a data URI and download the original file. The file type is detected automatically when possible.
What is Base64?
Base64 is a way of writing binary data (images, files, or text in any language) using only 64 safe characters: A-Z, a-z, 0-9, + and /, with = as padding. It lets you send data through systems that only handle plain text, such as email (MIME), JSON, XML, URLs and HTML. Every 3 bytes of input become 4 Base64 characters, so the output is about 33% larger than the original.
Important: Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or sensitive data.
How to use this Base64 tool
- Encode text: choose Encode, type or paste your text, and the Base64 result appears instantly (Live mode) or when you click Encode.
- Decode text: choose Decode and paste a Base64 string. Pick the right character set if the result looks garbled.
- Encode a file: open the File tab and choose any file to get its Base64 string or a data URI for HTML and CSS.
- Decode to a file: paste Base64 in the File tab and download the original file.
Options explained
- Character set: UTF-8 works for almost all text, including Hindi and emoji. Use ISO-8859-1 or UTF-16LE when a system requires it (for example, UTF-16LE for PowerShell's
-EncodedCommand). - URL-safe: replaces
+with-and/with_and removes padding, as used in JWT tokens and URLs. - 76-character lines: wraps the output as required by MIME email attachments.
- Each line separately: encodes or decodes multiple values at once, one per line.
Common uses of Base64
- Embedding small images in HTML or CSS as data URIs.
- Reading the payload of a JWT token (the middle part is URL-safe Base64).
- Email attachments and the HTTP Basic Authentication header.
- Passing scripts to PowerShell with
-EncodedCommand. - Storing binary data in JSON, XML or configuration files.
FAQ
Is this Base64 encoder safe for sensitive data?
Yes. All encoding and decoding happens in your browser with JavaScript. Your text and files are never uploaded, and the tool keeps working offline after the page loads.
Why does my decoded text show strange characters?
The original text was probably encoded with a different character set. Try switching between UTF-8, ISO-8859-1 and UTF-16LE.
Is there a size limit?
No fixed limit. Very large files (hundreds of MB) depend on your device's memory.
More free, private tools: PDF Tools, PDF to Word and the Password Generator. See them all on our Free Tools page.
0 Comments