Loading…
Loading…
Encode and decode Base64 instantly
Need productivity templates?
Task trackers, project planners, and automation scripts that save hours every week. Starting at $4.
Browse Productivity KitsBase64 encoding translates arbitrary binary data into a printable ASCII character set, making it safe to transmit through text-only channels like email headers, JSON payloads, and HTML attributes. The scheme uses 64 printable characters defined by RFC 4648, producing output that is universally readable by any text-processing system without escaping or corruption.
When encoding, the tool reads your input three bytes at a time and maps each 24-bit group into four 6-bit Base64 characters. If the input length is not divisible by three, padding characters (=) fill the final group.
For file encoding, the browser FileReader API reads the raw binary blob, converts it to an ArrayBuffer, and the encoder processes those bytes in the same three-at-a-time fashion. The output is prefixed with a data URI scheme (e.g., data:image/png;base64,) so it can be dropped directly into an HTML src or CSS url() attribute.
Decoding reverses the process: each group of four Base64 characters is converted back to three original bytes, padding is stripped, and the result is rendered as text or offered as a file download.
A front-end developer embedding a small loading spinner SVG directly into CSS as a background-image data URI to eliminate an extra HTTP request.
A backend engineer encoding a binary PDF attachment into Base64 before including it in a JSON API response for a mobile app.
A QA tester decoding a Base64-encoded JWT payload to inspect the claims without installing a dedicated JWT library.
A DevOps engineer converting a TLS certificate file to Base64 to store it safely as an environment variable in a CI/CD pipeline.
A web designer checking what a Base64-encoded font file looks like to confirm it is valid before embedding it in a @font-face declaration.
Scope note: Browser memory limits apply for very large files. Encoding files above ~50 MB may cause the tab to slow or crash on low-RAM devices. The tool handles text as UTF-8; binary files with unusual encodings should be uploaded rather than pasted to avoid garbled output.
Type or paste text in the input field
Encoded/decoded output appears instantly in the other panel
Toggle between Encode and Decode modes
Or upload a file to get its Base64 representation
About the Base64 Encoder / Decoder
Base64 converts binary data into ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). It is commonly used to embed images in HTML/CSS or send binary data in JSON.
Yes. Upload any file (images, PDFs, etc.) and get the Base64 data URI — ready to embed in HTML or CSS.
Base64 encodes 3 bytes into 4 characters. When the input length is not a multiple of 3, padding characters (=) are appended to complete the final block. One = means 1 padding byte was needed; == means 2 bytes were needed.
Base64-encoded output is approximately 33% larger than the original binary. A 1 MB image becomes roughly 1.37 MB as a Base64 string. This is why embedding very large images directly in HTML is discouraged.
Yes. URL-safe Base64 replaces + with - and / with _ to avoid encoding issues in URLs and HTTP headers. Some APIs (like JWT tokens) use the URL-safe variant. Standard Base64 may need percent-encoding when placed in a URL.
Completely. All encoding and decoding happens inside your browser using the native atob() and btoa() APIs plus FileReader. Nothing is uploaded to any server — your data never leaves your device.
Spotify-Wrapped stats for ChatGPT, Claude & Claude Code
Open →UtilitiesYour whole life on one grid — one square per week
Open →UtilitiesHow often is AI asked to do your job’s tasks? Rank among 718 jobs
Open →UtilitiesFive rounds, one number — your reaction time in milliseconds
Open →