{{ h }}
Base64 is a text-friendly representation of binary data. By mapping every three bytes to four printable characters, it safeguards files travelling through systems restricted to ASCII, such as legacy email, JSON APIs, or URL query strings. The added padding characters ensure message length is always divisible by four, preserving byte boundaries during transport and reconstruction.
With this decoder you paste or drop any Base64 fragment, optionally marked as a data URI, and the reactive engine instantly restores the original bytes in your browser. Switches adjust for URL-safe variations, missing padding, or stray whitespace. Statistical counters show input and output sizes, and an optional media preview renders images, audio, or video without external calls.
Developers often copy embedded image sprites from CSS or HTML that arrive Base64-encoded; decoding them here produces the PNG file ready for inspection. Remember that Base64 is not encryption—anyone holding an encoded string can restore its contents, so never embed confidential credentials or personal data in publicly shared links or code snippets.
Base64 translates binary octets into six-bit chunks, each represented by an index character drawn from the sets A–Z, a–z, 0–9, plus symbols “+” and “/”. Because 6 does not divide evenly into 8, the scheme processes data in 24-bit groups, emitting four output characters per group. The special “=” sign pads the final block so that the total always aligns to multiples of four characters, enabling stream reassembly without ambiguity across disparate transport layers.
Variables: Lin
– input length (characters); P
– number of “=” padding symbols; Bout
– decoded bytes.
Indicator | Typical Range | Meaning |
---|---|---|
Size ratio (Bout/Lin) | 0.74 – 0.76 | Healthy Base64 payload |
< 0.74 | Excess padding | Likely copied with line breaks |
> 0.76 | Missing padding | Enable “No padding” fix |
Parameter | Meaning |
---|---|
input | Base64 string or full data URI |
urlSafe | Converts “-” and “_” to “+” and “/” |
noPadding | Adds trailing “=” where length % 4 ≠ 0 |
stripWs | Removes spaces, tabs, and newlines |
wrap | Toggles soft-wrapping in text areas |
Example — decode SGVsbG8h
:
stripWs
to merge fragments.Concept formalised in MIME Part 1 (RFC 2045) and generalised in RFC 4648, which also defines the URL-safe alphabet.
All decoding occurs locally, meeting GDPR and similar privacy regulations.
Follow this sequence to restore readable content from any Base64 snippet.
Your string is processed entirely in your browser and never transmitted anywhere.
No. Base64 inflates size by roughly 33 percent. It encodes, not compresses.
A variant that replaces “+” and “/” with “-” and “_” so the result remains URL-friendly.
The “=” symbols pad the final block so its length divides evenly by four characters.
Modern browsers handle several megabytes, but decoding very large blobs may exhaust memory.
data:<mime>;base64,
.