Encode text or files to Base64, or decode Base64 strings back to their original form — instantly in your browser. Supports UTF-8/Unicode, URL-safe encoding, drag & drop files, and Data URI generation for images. 100% private, no upload.
Click to upload or drag & drop a file here (encode mode only)
Copied to clipboard!
Rate this tool
No ratings yet
Thanks for rating!
Base64 encoding converts binary data or text into a string of 64 safe ASCII characters (A-Z, a-z, 0-9, +, /), making it possible to embed images, files, or arbitrary bytes inside text-based formats like JSON, XML, HTML, CSS, and URLs. This tool uses your browser's native btoa() and atob() functions combined with UTF-8-aware TextEncoder/TextDecoder logic, so encoding and decoding happen instantly on your device with zero server upload.
This free Base64 converter supports plain text, full Unicode (including emoji and non-Latin scripts), and any file type, including images, PDFs, and documents, entirely inside your browser.
JavaScript's native btoa() and atob() functions only understand Latin-1 characters and throw errors on emoji, Chinese, Arabic, or accented text. This tool avoids that trap by converting your text to raw UTF-8 bytes with TextEncoder before encoding, and decoding back to UTF-8 with TextDecoder, so multi-byte characters like "café" or "😀" always convert correctly without corruption.
Standard Base64 uses the characters + and / along with = padding, which works fine in text files and JSON but can break when placed directly inside a URL or filename. URL-safe Base64 replaces + with - and / with _, and typically omits the = padding entirely, making it the required format for JWTs, OAuth tokens, and Base64 data embedded in query strings. This tool includes a one-click URL-safe toggle to switch between both formats instantly.
Beyond plain text, this tool lets you drag and drop or upload any file, including PNG, JPG, PDF, or any binary file, and converts it into a Base64 string using the browser's FileReader API. Enable the Data URI toggle to automatically wrap the result as a complete data:image/png;base64,... string, ready to paste directly into HTML, CSS, or JSON without any extra formatting.
This free Base64 converter is commonly used to embed small images directly into CSS or HTML without extra HTTP requests, decode JWT tokens and API responses, prepare binary attachments for email or JSON payloads, encode credentials for HTTP Basic Authentication headers, and convert files to text-safe strings for storage in databases or config files that don't support raw binary data.
People discover this tool by searching base64 encode, base64 decode, base64 converter, base64 to text, text to base64, base64 to image, base64 file encoder, base64 URL safe, atob btoa online, and base64 to PDF. This tool is used by developers, API testers, and IT professionals across the United States, United Kingdom, Canada, Australia, India, and worldwide for fast, reliable, browser-based encoding.
All tools work instantly in your browser, private by design, completely free.
Number to Words
Convert numbers & currency to words
Case Converter
UPPERCASE, lowercase & Title Case
Remove Duplicate Lines
Dedupe any list or text instantly
Online Notepad
Write & autosave notes in your browser
Compress Images
Shrink JPG and PNG photos
PDF to Word
Convert PDF to editable DOC
Word to PDF
Turn DOC files into PDFs
PDF to JPG
Save PDF pages as images
Images to PDF
Combine photos into a PDF
HEIC to JPEG
Open iPhone photos anywhere
Image Converter
JPG, PNG, WebP and more
Image Enhancer
Sharpen and improve photos
Background Remover
AI background removal
Certificate Generator
Design awards and diplomas
Invoice Generator
Create professional invoices
QR Code Generator
Custom QR codes for menus & payments
Barcode Generator
Scannable barcodes for receipts
Video Compressor
Shrink videos & extract audio
Image Editor
Compress, crop & convert photos
Merge PDF
Combine PDFs & images into one file
Split PDF
Break a PDF into separate pages
Compress PDF
Shrink PDF file size instantly
Sign PDF
Add your signature to any PDF
Protect PDF
Lock a PDF with a password
Add Watermark
Stamp text or logo onto PDF pages
Add Page Numbers
Number PDF pages automatically
Add Header & Footer
Stamp headers and footers on PDFs
ZIP Maker
Bundle any files into a ZIP online
Text Editor
Free online rich text editor
Random Text Generator
Generate lorem ipsum & filler text
PDF to JPG
Convert PDF pages into JPG images
Organize PDF
Reorder, delete or rotate PDF pages
Rotate PDF
Fix sideways or upside-down PDF pages
Base64 converts binary data or text into safe ASCII characters, letting you embed images, files, or credentials inside text-based formats like JSON, XML, HTML, CSS, URLs, and email attachments.
Yes, this tool uses UTF-8-aware encoding via TextEncoder and TextDecoder, so emoji, Chinese, Arabic, and accented characters convert correctly without the corruption that plain btoa/atob would cause.
Standard Base64 uses + and / with = padding, which can break inside URLs. URL-safe Base64 replaces those characters with - and _ and removes padding, the format required for JWTs and OAuth tokens.
Yes, drag and drop or upload any file type, including images, PDFs, and documents. The tool reads the file locally and converts it to a Base64 string, with an optional Data URI wrapper for images.
The tool shows a green "Valid" or red "Invalid" badge in real time as you type or paste, so you immediately know whether your input is a properly formatted Base64 string before decoding.
There's no hard limit, but very large files (over roughly 50MB) may slow down your browser since all processing happens locally on your device rather than on a server.
No. All encoding and decoding happens entirely inside your browser using JavaScript. Your text and files are never uploaded, transmitted, or stored anywhere.