Free Online Base64 Encoder & Decoder

Encode and decode Base64 strings and files instantly. Supports text encoding, URL-safe Base64, and file conversion, all running locally in your browser.

text_fields Input Text
code Base64 Output
text_fields Base64 Input
code Decoded Text

Key Features

swap_horiz

Text Conversion

Easily encode text to Base64 and decode Base64 back to text with proper Unicode support.

upload_file

File Support

Convert files to Base64 strings and decode Base64 back to downloadable files of any type.

bolt

Instant Processing

All operations run locally in your browser for instant results with no server latency.

lock

Privacy Protected

Your data never leaves your browser. No server storage or tracking.

Frequently Asked Questions

Getting Started
What is Base64 encoding?expand_more
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format using 64 characters (A-Z, a-z, 0-9, +, /). It's commonly used for encoding images, files, and other binary data in text-based formats like JSON, XML, HTML, and URLs.
Why use Base64 encoding?expand_more
Base64 is used when you need to transmit binary data over channels that only support text (like email, JSON, or URLs). It's also used for embedding images directly in HTML/CSS, storing binary data in databases, and creating data URIs.
Is my data safe?expand_more
Yes. All encoding and decoding happens locally in your browser using JavaScript. Your files and data never leave your device or get sent to any server, ensuring complete privacy.
Using the Tool
How do I encode text to Base64?expand_more
Switch to the "Encode" tab, type or paste your text into the input box, and click "Encode to Base64". The encoded result will appear in the output box. You can then copy it to your clipboard.
Can I convert files to Base64?expand_more
Yes! Use the "File Support" tab to upload any file. The tool will convert it to a Base64 string. You can also convert Base64 back to a file and download it. All file types are supported.
Examples
Example: Encode simple textexpand_more

Input:

Hello World

Base64 Output:

SGVsbG8gV29ybGQ=
Example: Encode JSON dataexpand_more

Input:

{"name":"John","age":30}

Base64 Output:

eyJuYW1lIjoiSm9obiIsImFnZSI6MzB9
Technical Details
What is the '=' at the end?expand_more
The '=' characters are padding added to make the Base64 string length a multiple of 4. Padding may be 0, 1, or 2 '=' characters depending on the input length. Some variants like Base64URL omit padding.
Can I use this for passwords or secrets?expand_more
Base64 is NOT encryption — it's just encoding. Anyone can decode Base64, so never use it to secure sensitive information. For passwords and secrets, use proper encryption or hashing algorithms.
What is the difference between Base64 and Base64URL?expand_more
Base64URL is a URL-safe variant of Base64 that replaces "+" with "-" and "/" with "_", and removes padding "=" characters. This makes it suitable for use in URLs and filenames without requiring percent-encoding. For example:

Standard: aGVsbG8+/w==\nURL-Safe: aGVsbG8-_w

Use Base64URL for JWT tokens, URL parameters, and filename-safe encoding. Use standard Base64 for data URIs, email attachments, and XML/JSON payloads.