Quick Base64 Encoding
Need to quickly encode a string for an API call, auth header, or config file? Type or paste below and copy the output. The conversion happens in real time as you type โ no buttons to click, no forms to submit. This is the fastest way to get a Base64-encoded string.
Code Examples
JavaScript:
btoa(unescape(encodeURIComponent(str)))Python:
base64.b64encode(text.encode('utf-8')).decode()PHP:
base64_encode($text)Java:
Base64.getEncoder().encodeToString(text.getBytes(UTF_8))Go:
base64.StdEncoding.EncodeToString([]byte(text))Common Encoding Scenarios
โHTTP Basic Auth: encode username:password for Authorization header
โData URIs: embed small files inline in HTML, CSS, or JSON
โEmail: encode binary attachments for MIME transport
โAPIs: send binary data through text-only JSON endpoints
โConfig: store binary values in .env files or YAML configs