Skip to main content
Particularly LogoParticular.ly

Base64 Encoder/Decoder

Base64 Encoder/Decoder
Encode and decode Base64 strings

Press Ctrl+Enter (Cmd+Enter on Mac) to encode. Maximum size: 1MB.

About the Base64 Encoder/Decoder

The Base64 Encoder/Decoder converts arbitrary text and binary data into the Base64 ASCII representation and back again. Base64 works by taking three bytes (24 bits) of input and splitting them into four 6-bit groups, mapping each group to one of 64 safe characters (A-Z, a-z, 0-9, plus + and /). This produces output that survives transport through systems that only handle plain text, which is why Base64 is everywhere in email attachments, JSON payloads, and HTTP headers.

Encoding inflates data by roughly 33 percent because four output characters represent three input bytes, and trailing = padding characters fill out the final group when the input length is not divisible by three. Decoding reverses the process, reconstructing the original bytes from the character stream. This tool runs the conversion in the browser so your input is never transmitted, which matters when you are pasting tokens, credentials, or other sensitive strings.

Common uses include inspecting JWT (JSON Web Token) payloads, which are Base64url-encoded; embedding small images as data URIs in CSS or HTML; decoding API keys and Basic Auth headers; and debugging encoded fields in API responses. If you work with URLs, note that standard Base64 uses + and / which are unsafe in query strings, so a URL-safe variant substitutes - and _ instead.

A practical tip: if decoding fails, check for whitespace, line breaks, or missing padding, since strict decoders reject malformed input. For data that must travel inside a URL, pair this with the URL Encoder/Decoder, and remember that Base64 is encoding, not encryption, so it provides no confidentiality on its own.

Frequently asked questions

Does Base64 encryption keep my data secure?
No. Base64 is a reversible encoding scheme, not encryption. Anyone can decode it instantly, so never use it to protect passwords or secrets.
Why does my encoded string end with one or two equals signs?
The = characters are padding. They appear when the input length is not a multiple of three bytes, signaling the decoder how many bytes the final group represents.
How much larger does data get after Base64 encoding?
About 33 percent larger, because every three bytes of input become four output characters. Line breaks in some formats add a little more.
What is the difference between Base64 and Base64url?
Base64url replaces the + and / characters with - and _ and often omits padding, making the output safe to place inside URLs and filenames.