Base64 Tools
Base64 Encoder & Decoder โ Text & File
Fast, reliable Base64 utilities for everyday development. Encode plain text or files to Base64, decode Base64 back to text or binary, handle URL-safe variants, optional padding, and line wrapping. Works entirely in your browser for privacy.
What you can do
- Text โ Base64: Convert UTF-8 text to Base64 and back.
- File โ Base64: Turn any file into a Base64 string for embedding or transport.
- Base64 โ File: Decode to binary; optionally treat output as
PNGorJPGfor quick preview. - URL-safe: Switch between standard and URL-safe forms (
+//โ-/_). - Padding & Wrap: Keep/remove
=padding and wrap lines at a fixed column (e.g. 64). - Data URL: Paste full
data:*;base64,stringsโthe tool extracts the payload automatically. - Local processing: Everything runs client-side; no uploads, no servers.
How to use
- Text Encode: Paste text โ choose URL-safe/padding/wrap โ Run โ copy or download
.b64.txt. - Text Decode: Paste Base64 (or a data URL) โ optionally ignore whitespace / URL-safe input โ Run.
- File Encode: Select a file โ adjust options โ Run โ get Base64 string.
- File Decode: Paste Base64 or drop a text file โ (optional) โI believe this is an imageโ and pick PNG/JPG โ preview or download.
Tips & troubleshooting
- Invalid characters: Enable โInput may be URL-safeโ when decoding strings that use
-and_. - Missing padding: Some Base64 omits
=. The decoder auto-repairs padding, but you can force keep/remove on encode. - Whitespace: Enable โIgnore whitespaceโ to accept wrapped or spaced Base64.
- Data URLs: The tool strips the header (e.g.
data:image/png;base64,) for youโpaste as is. - Binary output appears garbled: Thatโs expected in the text box; use Download to save the decoded binary.
- Large inputs: Browser memory limits apply. For very large files, prefer chunking outside the browser.
FAQ
What is Base64? A binary-to-text encoding that represents bytes using 64 ASCII characters. Common in HTTP, MIME, JWT, and embedding assets.
What is URL-safe Base64? A variant replacing + โ - and / โ _; padding may be omitted.
Do I need padding? Many parsers accept unpadded strings; some standards still require it. Toggle as needed.
Is processing private? Yes. All work happens locally in your browser; no data is sent anywhere.
Use cases
- Embed small images or fonts as Base64 in CSS/HTML.
- Move binary blobs through systems that only allow text.
- Quickly inspect or repair Base64 from logs and APIs.
Examples
"Hello" โ SGVsbG8= (standard) / SGVsbG8 (no padding) / SGVsbG8 (URL-safe is identical here)
Data URL: data:image/png;base64,<...> โ paste directly into Text Decode or File Decode.