Encode and decode Base64 strings, files, and data URIs instantly.
Free online Base64 encoder and decoder. Paste text or upload a file to encode to Base64, or paste a Base64 string to decode it. Supports standard and URL-safe Base64 (RFC 4648), data URI generation for embedding images and files, hex conversion, and MIME line wrapping. Handles UTF-8, ASCII, and ISO-8859-1 character encodings. Runs entirely in your browser — no data is ever sent to a server.
Keywords: base64 encoder, base64 decoder, base64 encode online, base64 decode online, base64 to text, text to base64, base64 file, data uri generator, base64 image, url safe base64, base64 to hex, base64 converter, base64 online, encode base64, decode base64
Tags: base64, encode, decode, binary, data-uri, url-safe
Paste your text into the input area on the left, or upload any file using the upload button.
Choose your encoding options — enable URL-safe mode for use in URLs and JWTs, or line wrapping for MIME-compatible output. Select a character encoding if needed.
Click Encode or press ⌘↵ (Mac) / Ctrl+Enter (Windows) to convert your text to Base64.
To reverse the process, paste a Base64 string and click Decode. The tool detects if your input looks like Base64 and prompts you automatically.
For embedding images in HTML or CSS, use the Data URI action to generate a complete data: URL. Copy the output with ⌘⇧C, download it as a file, or use Share to create a shareable URL.
Standard Base64 encoding and decoding per RFC 4648 with full Unicode support via UTF-8.
URL-safe Base64 variant (RFC 4648 §5): replaces + with - and / with _, strips padding — ideal for URLs, filenames, and JWTs.
Data URI generator: creates data:[mime];base64,... strings for embedding images, fonts, and files directly in HTML or CSS.
Base64 to hex and hex to Base64 conversion for cryptographic and debugging workflows.
MIME line wrapping: inserts 76-character line breaks per RFC 2045 for email-compatible Base64 output.
Multiple character encoding support: UTF-8 (default), ASCII, and ISO-8859-1.
Inline image preview: when decoding produces an image data URI, a visual preview is rendered below the output.
Auto-detection: automatically detects whether input looks like Base64-encoded data and suggests Decode.
File upload support: encode any binary file to Base64 or decode Base64 back to a downloadable file.
Input and output byte size statistics with size ratio badge visualising encoding overhead.
Shareable URLs: gzip-compresses your input into a URL parameter so you can share it with teammates.
Works entirely in your browser — no data is ever sent to any server. Your content stays private.
Keyboard shortcuts for power users: ⌘⇧E to encode, ⌘⇧D to decode, ⌘⇧K to clear.