[{"data":1,"prerenderedAt":156},["ShallowReactive",2],{"guide-base64-encoding-guide":3},{"id":4,"title":5,"body":6,"date":146,"description":147,"extension":148,"meta":149,"navigation":150,"path":151,"readingTime":152,"seo":153,"stem":154,"__hash__":155},"guides\u002Fguides\u002Fbase64-encoding-guide.md","What is Base64 Encoding? How It Works",{"type":7,"value":8,"toc":135},"minimark",[9,14,27,31,34,44,49,52,58,65,69,98,102,122,126],[10,11,13],"h2",{"id":12},"what-is-base64","What is Base64?",[15,16,17,18,22,23,26],"p",{},"Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters. It converts binary data into a string of letters, numbers, and two special characters (",[19,20,21],"code",{},"+"," and ",[19,24,25],{},"\u002F",").",[10,28,30],{"id":29},"how-base64-works","How Base64 Works",[15,32,33],{},"Base64 takes 3 bytes (24 bits) of binary data and splits them into four 6-bit groups. Each 6-bit group maps to one of 64 characters in the Base64 alphabet:",[35,36,41],"pre",{"className":37,"code":39,"language":40},[38],"language-text","Value 0–25:  A–Z\nValue 26–51: a–z\nValue 52–61: 0–9\nValue 62:    +\nValue 63:    \u002F\n","text",[19,42,39],{"__ignoreMap":43},"",[45,46,48],"h3",{"id":47},"example","Example",[15,50,51],{},"The text \"Hello\" encodes to:",[35,53,56],{"className":54,"code":55,"language":40},[38],"Hello → SGVsbG8=\n",[19,57,55],{"__ignoreMap":43},[15,59,60,61,64],{},"The ",[19,62,63],{},"="," padding character appears when the input length is not a multiple of 3 bytes.",[10,66,68],{"id":67},"when-to-use-base64","When to Use Base64",[70,71,72,80,86,92],"ul",{},[73,74,75,79],"li",{},[76,77,78],"strong",{},"Email attachments",": MIME encodes binary files as Base64",[73,81,82,85],{},[76,83,84],{},"Data URLs",": Embed small images directly in HTML\u002FCSS",[73,87,88,91],{},[76,89,90],{},"API authentication",": HTTP Basic Auth sends credentials as Base64",[73,93,94,97],{},[76,95,96],{},"JSON web tokens",": JWT payloads are Base64-encoded",[10,99,101],{"id":100},"when-not-to-use-base64","When NOT to Use Base64",[70,103,104,110,116],{},[73,105,106,109],{},[76,107,108],{},"Large files",": Base64 increases size by ~33%",[73,111,112,115],{},[76,113,114],{},"Password storage",": Base64 is encoding, not encryption — never use it for passwords",[73,117,118,121],{},[76,119,120],{},"Compression",": Base64 does not compress data",[10,123,125],{"id":124},"try-it-yourself","Try It Yourself",[15,127,128,129,134],{},"Use our free ",[130,131,133],"a",{"href":132},"\u002Ftools\u002Fbase64","Base64 Encoder\u002FDecoder"," to encode and decode Base64 strings online.",{"title":43,"searchDepth":136,"depth":136,"links":137},2,[138,139,143,144,145],{"id":12,"depth":136,"text":13},{"id":29,"depth":136,"text":30,"children":140},[141],{"id":47,"depth":142,"text":48},3,{"id":67,"depth":136,"text":68},{"id":100,"depth":136,"text":101},{"id":124,"depth":136,"text":125},"2026-05-26","Learn how Base64 encoding works, when to use it, and why it's essential for web development and data transfer.","md",{"immutable":150},true,"\u002Fguides\u002Fbase64-encoding-guide",6,{"title":5,"description":147},"guides\u002Fbase64-encoding-guide","IaFX7YrQ-XWikYBxK52HJD8mQoI7O4Dg701Q5z1PHrM",1780401322634]