Base64: ready-made strings, encoder and decoder

Need a ready base64 string of an image for a test, or want to quickly encode your own file? Both are here. The encoder and decoder run right in your browser — files are never uploaded.

📋 Ready-made base64 strings

Small samples to paste into tests and fixtures. The button copies the string to your clipboard.

1x1 png
Transparent PNG 1×1
image/png · common placeholder for pixels and trackers
red png
Red PNG 16×16
image/png · small color image
svg
SVG icon
image/svg+xml · vector image
🔠
Text “Hello, World!”
text/plain · plain text in base64

⬆️ Encoder: file → base64

Pick any file — it is encoded in your browser, nothing is sent to the server.

⬇️ Decoder: base64 → file

Paste base64 (a data:… prefix is fine). If it is an image, you will see a preview and can download the file.

🔁 Text ↔ base64

Unicode is handled correctly (Cyrillic, emoji) — encoding uses UTF-8.

🧠 How base64 works

Base64 takes binary data three bytes (24 bits) at a time, splits them into four 6-bit groups and replaces each with a printable character from the A–Z a–z 0–9 + / alphabet. That is how any bytes can be written as plain text, while the size grows by about a third.

🔤 Source bytes M a n 3 bytes 01 24 bits 01001101 01100001 01101110 6×4 4 × 6 bits 010011 010110 000101 101110 = 19 22 5 46 🔠 Alphabet A–Z a–z 0–9 + / = padding 💾 TWFu printable text

Base64 is an encoding, not encryption: the string decodes back with a single command and protects nothing. The URL-safe variant replaces “+” and “/” with “-” and “_” (used in JWT).