[{"data":1,"prerenderedAt":104},["ShallowReactive",2],{"tool-guide:encoder-decoder":3},{"overview":4,"whatIs":5,"useCases":6,"steps":13,"commonMistakes":19,"relatedStandards":25,"comparison":41,"example":81,"limitations":85,"faq":88},"Base64 \u002F URL Encoder & Decoder transforms bounded text using Base64, URL percent-encoding, or HTML entities and distinguishes text decoding from binary bytes.","Encoding transforms data from one representation to another so it can be safely transported through systems that have character restrictions. Base64 encoding converts arbitrary binary data into a string of 64 printable ASCII characters (A-Z, a-z, 0-9, +, \u002F), making it safe to embed in JSON, XML, email bodies, and data URIs. URL percent-encoding (also called URL encoding) replaces characters that have special meaning in URLs — such as spaces, ampersands, and question marks — with percent-encoded equivalents (%20, %26, %3F). HTML entity encoding converts reserved HTML characters (\u003C, >, &, \") into named or numeric entities so they display as text instead of being interpreted as markup. None of these encodings provide any security or confidentiality — they are fully reversible transformations designed for transport compatibility. Base64 increases data size by roughly 33%, URL encoding expands only unsafe characters, and HTML entity encoding expands only reserved characters. Understanding which encoding to use and when is essential for building correct APIs, handling file uploads, and preventing XSS vulnerabilities in web applications.",[7,8,9,10,11,12],"Embedding images in CSS or HTML — Base64-encode a small icon or SVG to create a data URI, eliminating an extra HTTP request.","Building API requests — URL-encode query parameters that contain special characters (spaces, ampersands, equals signs) so the server parses them correctly.","Debugging webhook payloads — decode a Base64-encoded webhook body to read the original JSON or XML content.","Preparing email content — Base64-encode attachments or HTML email bodies for MIME-encoded messages.","Preventing XSS — HTML-entity-encode user-generated content before inserting it into a web page to neutralize script injection.","Passing binary data through JSON — Base64-encode binary blobs (images, certificates, protobuf) since JSON has no binary type.",[14,15,16,17,18],"Choose the encoding mode: Base64, URL percent-encoding, or HTML entities.","Select the direction: encode (text to encoded form) or decode (encoded form back to text).","Enter the exact source text in the input field.","Run the transform. The output shows the encoded or decoded result.","For Base64 decoding of non-text binary data, review the hexadecimal preview to see the raw bytes.",[20,21,22,23,24],"Confusing encoding with encryption — Base64, URL encoding, and HTML entities are fully reversible by anyone. They provide zero confidentiality.","Double-encoding URLs — encoding an already-encoded URL produces sequences like %2520 (percent-encoded percent sign). Always encode raw values, not already-encoded strings.","Using standard Base64 in URLs — standard Base64 uses + and \u002F which conflict with URL syntax. Use Base64url (- and _ instead) for tokens, filenames, and query parameters.","Encoding entire URLs instead of components — only the values of query parameters and path segments should be percent-encoded, not the delimiters (?, &, =, \u002F).","Forgetting padding in Base64 — standard Base64 pads with = characters to make the output a multiple of 4. Some systems strip padding; others require it. Know which your system expects.",[26,29,32,35,38],{"title":27,"url":28},"RFC 4648 — Base Encodings (Base64, Base32, Base16)","https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc4648",{"title":30,"url":31},"RFC 3986 — URI Syntax (percent-encoding)","https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc3986",{"title":33,"url":34},"MDN — encodeURIComponent() reference","https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FJavaScript\u002FReference\u002FGlobal_Objects\u002FencodeURIComponent",{"title":36,"url":37},"MDN — atob() and btoa() reference","https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FWindow\u002Fbtoa",{"title":39,"url":40},"HTML Standard — Named character references","https:\u002F\u002Fhtml.spec.whatwg.org\u002Fmultipage\u002Fnamed-characters.html",{"heading":42,"columns":43,"rows":47},"Base64 vs URL encoding vs HTML entities",[44,45,46],"Base64","URL encoding","HTML entities",[48,54,60,66,70,76],{"label":49,"values":50},"Input",[51,52,53],"Any binary data","Text for URLs","Text for HTML",{"label":55,"values":56},"Output charset",[57,58,59],"A-Z, a-z, 0-9, +, \u002F, =","Printable ASCII + %XX","ASCII + &name; \u002F &#NNN;",{"label":61,"values":62},"Size overhead",[63,64,65],"~33% always","Only unsafe chars","Only reserved chars",{"label":67,"values":68},"Reversible",[69,69,69],"Yes",{"label":71,"values":72},"Common use",[73,74,75],"Data URIs, APIs, email","Query params, form data","HTML display, XSS prevention",{"label":77,"values":78},"Provides security",[79,79,80],"No","Prevents XSS only",{"label":82,"input":83,"output":84},"Decode a Base64 word","c3RhY2tjYWNoZQ==","stackcache",[86,87],"Encoding does not encrypt or protect data.","URL encoding a component is different from validating or safely constructing a complete URL.",[89,92,95,98,101],{"question":90,"answer":91},"What is Base64 encoding?","Base64 encodes binary data as ASCII text using 64 printable characters. It is commonly used to embed images in CSS, encode email attachments, and pass binary data in JSON or URLs.",{"question":93,"answer":94},"Is Base64 the same as encryption?","No. Base64 is a reversible encoding, not encryption. Anyone can decode a Base64 string. Use proper encryption for sensitive data.",{"question":96,"answer":97},"What is URL percent-encoding?","URL encoding replaces unsafe characters with percent-encoded equivalents (e.g., space becomes %20) so that special characters can safely appear in URLs and query strings.",{"question":99,"answer":100},"When should I use Base64url instead of standard Base64?","Use Base64url when the encoded string will appear in URLs, filenames, or cookies. It replaces + with - and \u002F with _ to avoid conflicts with URL-reserved characters, and often omits trailing = padding.",{"question":102,"answer":103},"Why does my Base64 string end with equal signs?","The = characters are padding. Base64 output must be a multiple of 4 characters. Padding fills the remaining slots when the input length is not a multiple of 3 bytes.",1788868140176]