Base64 Encoder / Decoder
Encode strings, decode base64 text, and convert images to/from base64.
Encoding
Convert any string or binary data to Base64-encoded ASCII text for safe transport over text-only channels.
Decoding
Decode Base64 strings back to their original form. Supports URL-safe Base64 (+ vs - and / vs _).
Image Conversion
Upload any image to get its Base64 data URI, perfect for embedding assets directly in HTML or CSS.
What Is a Base64 Encoder/Decoder?
Base64 encoding converts binary data or arbitrary text into a string of 64 printable ASCII characters — A-Z, a-z, 0-9, + and /. This allows binary content to be safely transmitted through text-based systems that might otherwise mishandle raw bytes.
Base64 decoding reverses the process, converting the encoded ASCII string back to the original binary data or text. Together they form the foundation for embedding images in CSS, encoding email attachments, and transmitting binary data in JSON APIs.
Common Use Cases
- check_circleEncode binary data for embedding in JSON API payloads
- check_circleDecode Base64-encoded strings from API responses
- check_circleEncode images as Base64 for CSS data URIs
- check_circleDecode JWT token payloads from Base64 for inspection
- check_circleEncode authentication credentials for HTTP Basic Auth headers
- check_circleDecode Base64 email attachments to inspect their content
Encode and Decode
Switch between Base64 encoding and decoding in a single tool — paste raw text or a Base64 string and get the converted result instantly.
Standard Base64
Uses the standard Base64 alphabet (RFC 4648) with + and / and = padding, compatible with all major languages and systems.
Browser-Only
All encoding and decoding runs locally. Your data never leaves the browser.
Frequently Asked Questions
What is Base64 used for?
Base64 is used to safely transmit binary data through text-based protocols: embedding images in HTML/CSS, encoding email attachments, storing binary data in JSON, and encoding credentials in HTTP headers.
Does Base64 compress data?
No. Base64 increases data size by approximately 33% because it represents every 3 bytes as 4 characters. It is an encoding scheme, not a compression algorithm.
What is the difference between Base64 and Base64url?
Base64url replaces + with - and / with _ to make the encoded string safe in URLs and filenames without percent-encoding. JWT tokens use Base64url encoding.
Can Base64 encode any type of data?
Yes. Base64 encodes any sequence of bytes, whether text, images, audio, or other binary formats. The encoded output is always plain ASCII text.
Developer Insights
From the Blog
Base64 Encoding: A Complete Technical Reference
Everything about Base64 — from encoding theory to real-world use in data URIs, JWT tokens, and binary transfer.
The Case for 100% Client-Side Data Processing
Why we built OpenFormatter to process all data locally, and what that means for your workflow security.
Why JSON Formatting Matters More Than You Think
How proper JSON structure prevents production bugs, improves debugging, and makes code reviews faster.