BASE64 CONVERTER
Encode and decode Base64 online. Convert text, files, and images to Base64 data URIs.
Everything runs locally in your browser. Your data never leaves your device - no uploads, no server processing.
All processing happens directly on your machine using JavaScript. Close the tab and everything is gone. No data ever reaches any external server.
Base64 character reference
Base64 uses 64 characters: A-Z, a-z, 0-9, + and /. The = symbol is used for padding.
Conversion analytics
How to encode and decode Base64
Convert text to Base64, decode Base64 strings, or turn images into data URIs
Full Documentation DocsChoose mode
Select text encode, text decode, or image mode
Input data
Type, paste, drag and drop, or upload your file
Get results
Copy Base64 string or download result
Why choose this Base64 encoder and decoder?
RFC 4648 compliant Base64 converter for text and images
Image statistics and metadata
Detailed image analysis: resolution, MIME type, file size, color channels, and bit depth for every conversion.
One-click swap and reverse
Instantly reverse input and output. Convert encoded data back or switch conversion direction with one click.
Paste image from clipboard
Paste images directly from clipboard. Convert screenshots and copied images to Base64 instantly without saving files first.
11 image formats with SVG
Full support for JPG, PNG, GIF, WEBP, AVIF, BMP, TIFF, ICO, HEIC, HEIF, and SVG. HEIC and TIFF files auto-convert for browser compatibility.
50 MB upload limit
Upload large files up to 50 MB. Drag & drop or click to upload for instant Base64 conversion.
Trim and clean Base64 input
Toggle to automatically remove leading and trailing whitespace for cleaner, more accurate conversions.
Frequently Asked Questions
Common questions about Base64 encoding, decoding, and data URIs
What is Base64 encoding?
Base64 encodes binary data into text using 64 characters (A-Z, a-z, 0-9, +, /). Defined by RFC 4648, it is used in emails (MIME), HTML/CSS data URIs, JSON web tokens, and API data transfer.
Is Base64 encoding the same as encryption?
No. Base64 is reversible encoding, not encryption. Anyone can decode a Base64 string back to the original data without a key. For security, use actual encryption (AES, RSA) and then optionally Base64-encode the result for safe transport.
How to decode Base64 online?
Paste your Base64 string into the tool, click Decode, and you'll instantly get the original text or file.
How do I convert an image to Base64 for HTML or CSS?
Upload your image in the Image Encode mode. The tool generates a Base64 data URI string (data:image/png;base64,...) that you can paste directly into HTML img src attributes or CSS background-image properties. Toggle the data URI prefix on or off as needed.
How to encode a file to Base64?
Upload your file, select Encode, and the tool generates a Base64 string you can copy or download.
What image formats are supported?
11 formats are supported: JPG, PNG, GIF, WEBP, AVIF, BMP, TIFF, ICO, HEIC, HEIF, and SVG. HEIC files auto-convert to JPEG and TIFF files auto-convert to PNG for browser compatibility. Files up to 50 MB are accepted.
Is my data safe with this tool?
Yes. All encoding and decoding runs locally in your browser using JavaScript. Your text and images are never uploaded to any server. Close the tab and all data is gone from memory.
Why is Base64 output larger than the original?
Base64 encoding increases data size by approximately 33%. Every 3 bytes of input become 4 Base64 characters. A 1 MB image produces roughly 1.33 MB of Base64 text. This is the trade-off for representing binary data as safe ASCII text.
Technical Details
How this RFC 4648 Base64 encoder processes text and images
RFC 4648 Encoding Engine
This Base64 encoder implements the RFC 4648 standard using the browser's native btoa() and atob() functions. Text input is processed as UTF-8 with encodeURIComponent for proper multi-byte character handling. File encoding uses the FileReader API with ArrayBuffer conversion for binary-accurate Base64 output.
Zero-Upload Privacy
All encoding and decoding runs in your browser using client-side JavaScript. Your text and images are never transmitted to any server. Processing happens in volatile memory - close the tab and all data is gone. Zero server communication for any conversion.
11 Image Formats with Auto-Conversion
Supports 11 image formats: JPG, PNG, GIF, WEBP, AVIF, BMP, TIFF, ICO, HEIC, HEIF, and SVG. HEIC and HEIF files auto-convert to JPEG via the heic2any library. TIFF files auto-convert to PNG via the UTIF library. Output includes optional data URI prefix (data:image/type;base64,...) ready for HTML img tags or CSS background properties.
Performance
Sub-10ms encoding for standard text inputs. File processing uses streaming ArrayBuffer conversion for memory efficiency. No external libraries loaded until the first user action - initial page load stays under 1 second with zero render-blocking resources.
Data URI Output for HTML and CSS
Image-to-Base64 mode generates complete data URI strings in the format data:image/type;base64,... that can be embedded directly in HTML src attributes or CSS url() declarations. Toggle the data URI prefix on or off depending on your use case. Raw Base64 output is available for API payloads and database storage.
Multiple Input Methods
Type or paste text directly, drag and drop files onto the input area, upload via file picker, or paste images from clipboard (Ctrl+V). The tool auto-detects input type and switches conversion mode accordingly. Supported text file types include TXT, JSON, XML, HTML, CSS, and JS.