Base64 Encoder / Decoder
NewEncode text or files to Base64 and decode Base64 strings online for free. Supports standard Base64, URL-safe Base64, and image data: URL encoding. No upload — everything runs in your browser.
TEXT INPUT
BASE64 OUTPUT
Output will appear here...About this tool
Base64 is an encoding scheme that converts binary data—bytes—into a string of 64 printable ASCII characters. It is widely used to embed images in CSS as data: URLs, pass binary payloads in JSON or XML, transmit email attachments (MIME), and store binary blobs in databases that expect text. This tool encodes any text string to Base64 and decodes any Base64 string back to text. It also supports URL-safe Base64 (which replaces + with - and / with _ so the output can be safely placed in a URL query string) and can encode image files to data: URL format.
How to use
- 1Select the "Text" tab for strings, or "File" to encode an image or file.
- 2Paste your text or pick a file — the Base64 output appears instantly.
- 3Toggle "URL-safe" if you need the result safe for use in a URL query parameter.
- 4Switch to the "Decode" tab to convert a Base64 string back to its original text.
Frequently asked questions
- Is Base64 a form of encryption?
- No. Base64 is an encoding, not encryption. Anyone who receives a Base64 string can decode it instantly without a key. Never use Base64 to protect sensitive data—use real encryption (like AES-256) for that.
- What is URL-safe Base64?
- Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 substitutes - for + and _ for /, and omits the = padding, making the output safe to include in a URL query string without percent-encoding.
- Why does Base64 increase data size?
- Every 3 bytes of input become 4 Base64 characters, so Base64 encoding increases data size by roughly 33%. For large files, this overhead should be considered.
- Can I encode a file to Base64?
- Yes. Select an image or any file using the File tab. The tool produces a data: URL (e.g. data:image/png;base64,...) that you can use directly in HTML or CSS without hosting the file separately.