Convert to BASE64, Free
Files convert instantly in your browser. 100% private, any file size, no account needed.
How to convert to BASE64
Base64 is an encoding scheme that converts binary data into a text-safe representation using only 64 printable ASCII characters. It is used extensively in data URIs (embedding images directly in HTML or CSS), JWT tokens, email attachments (MIME encoding), API payloads that must carry binary in a JSON string, and configuration files that store encoded credentials. The encoding increases size by roughly 33 percent but guarantees the data survives text-based transport.
The conversion runs in your browser using JavaScript's built-in btoa() function for text and a typed array approach for binary files. Nothing is uploaded to a server.
Enter text or upload a file
Paste text in the input field to encode it as Base64, or drop a binary file (image, PDF, font) to encode its raw bytes.
Choose encoding type
Select standard Base64 or Base64url (URL-safe variant that replaces + with - and / with _ for use in URLs and JWT tokens).
Read the Base64 output
The encoded string appears in the output field. For an image, you can prefix it with data:image/png;base64, to create a data URI usable in HTML or CSS.
Copy the result
Highlight the Base64 string and copy it for use in your code, config, or HTML.
Frequently asked questions
Why does Base64 make the data larger?
Base64 encodes every 3 bytes of input as 4 characters of output. That 4/3 ratio means Base64 is always about 33 percent larger than the original binary data.
What is the difference between Base64 and Base64url?
Standard Base64 uses + and / which are special characters in URLs. Base64url replaces + with - and / with _, making it safe to use in URLs and JWT tokens without percent-encoding.
Is my data uploaded to a server?
No. The conversion runs entirely in your browser using JavaScript.
How do I embed a Base64 image in HTML?
<img src='data:image/png;base64,YOUR_BASE64_STRING'> substitutes the src URL with the encoded image data directly.
What is the maximum size for Base64 conversion?
There is no server-imposed limit. Large files produce very long strings that may be slow to render in the text output box. Practical limits depend on browser memory.