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