Developer Tools
Base64 Encoder / Decoder
Encode any text to Base64 or paste a Base64 string to decode it back. Switch modes, copy output, or swap input and output in one click.
Encode or decode in three steps
No software to install. Works in any browser, on any device.
Paste text or Base64
Enter text to encode, or a Base64 string to decode.
Choose encode or decode
Click the appropriate button.
Copy the result
Click to copy the encoded or decoded output.
Base64 Encoder
Encode and decode
Both directions in one tool. Switch instantly.
Any text
URLs, JSON, HTML, code snippets — any text encodes cleanly.
URL-safe option
Replaces + and / with - and _ for use in URLs and filenames.
About Base64 Encoding
Base64 is an encoding scheme that converts binary or text data into a string of ASCII characters. It is used everywhere in computing: embedding images in HTML and CSS, encoding email attachments, storing binary data in JSON, transmitting data in URLs, and handling authentication tokens in APIs.
The encoding works by taking 3 bytes of input and converting them into 4 Base64 characters, each representing 6 bits of the original data. The resulting string is always plain ASCII — safe to include in any text-based protocol. The trade-off is size: Base64-encoded output is approximately 33% larger than the original.
Base64 is not encryption — it is trivially reversible by anyone with a decoder. Do not use Base64 to secure sensitive data. It is an encoding format for transport and storage compatibility, not a security measure.
Common use cases: data: URIs for images, Basic Auth headers, JWT tokens (header and payload are Base64Url encoded), and storing binary data in JSON APIs.
More free developer tools: URL Encoder / Decoder · JSON Formatter · UUID Generator
More Developer Tools
URL Encoder / Decoder
Encode or decode percent-encoded URLs and query parameters instantly.
Use itJSON Formatter
Beautify and validate JSON. Catch syntax errors instantly.
Use itUUID Generator
Generate random UUID v4 strings instantly. Copy one or bulk-generate.
Use itFrequently Asked Questions
What is Base64 used for?
Encoding binary data as ASCII text for contexts that only handle text — email attachments (MIME), data URIs in HTML/CSS, HTTP headers, and JSON payloads carrying binary data.
Does Base64 encrypt my data?
No. Base64 is encoding, not encryption — easily reversible by anyone. Don't use it to hide sensitive data. Use proper encryption for security.
Why is Base64 output longer than the input?
Every 3 bytes of input becomes 4 ASCII characters — a 33% overhead. 1 KB becomes ~1.33 KB in Base64.
Standard vs URL-safe Base64?
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces these with - and _ so strings can be safely used in URLs and filenames.