Base64 Encode / Decode

Text · files · data URLs · image preview

Plain text
0 chars · 0 bytes
Base64
0 base64 chars

Drag a file here, or

Any file type — converts to Base64 with auto-detected MIME

About this tool

What is Base64 and when do I need to encode something?
Base64 converts binary data (images, files, arbitrary bytes) into ASCII characters safe to transmit in text fields, data URIs, or HTTP headers. Common uses: embedding images in CSS/HTML, encoding API credentials, email MIME attachments.
Can I encode or decode a file (not just text)?
Yes. Drop any file in the file tab to get its Base64 representation, or paste a Base64 string to download the decoded binary.
Is my data uploaded anywhere?
No. Encoding and decoding happen entirely in your browser using the Web Crypto and FileReader APIs. No data leaves your machine.
What is the difference between standard Base64 and URL-safe Base64?
Standard Base64 uses + and / characters that break in URLs. URL-safe Base64 replaces them with - and _ so the encoded string works in query parameters and JWT tokens.