Base64 Encoder
Base64-encode text in your browser with full UTF-8 support (emoji, accents, CJK). Nothing is uploaded or logged. Free, instant.
About this tool
Encode any text to base64 with correct UTF-8 handling: accented characters, emoji, and CJK text all encode properly, unlike naive btoa() calls which throw on non-Latin input.
Use it for basic-auth headers, data URIs, JSON-embedded binary strings, and anywhere a text-safe encoding is required.
Common uses
- Build an Authorization: Basic header value from user:password.
- Embed small text payloads in JSON or environment variables safely.
- Create data: URIs for inline content.
Automate via API
The same conversion is available as a REST endpoint for scripts, pipelines, and backends:
curl -X POST https://payloadly.com/api/v1/tools/base64-encoder \ -H "Content-Type: text/plain" \ -H "X-Api-Key: YOUR_API_KEY" \ --data-binary @input.txt
Worked examples
Real payloads from tools people use daily, with the exact output this converter produces. Every example runs in your browser, so you can load one and adapt it to your own data.
Encode a Basic auth header
HTTP Basic auth expects base64 of 'username:password'. Encode the pair, then prefix the result with 'Basic ' in your Authorization header.
aladdin:opensesame
YWxhZGRpbjpvcGVuc2VzYW1l
Base64 notes
Base64 encodes binary or text data into a 64-character alphabet so it can travel through text-only channels: data URIs, basic auth headers, email bodies, and JSON payloads.
- Base64 is encoding, not encryption; anyone can decode it.
- URL-safe base64 swaps `+/` for `-_` and often drops `=` padding.
- Encoding inflates size by roughly 33%.
Frequently asked questions
Is my data uploaded to a server?
No. This tool runs entirely in your browser using JavaScript, and there are no ads on the page. Nothing you paste or drop here is uploaded, logged, or stored, and you can verify that yourself: open your browser's developer tools and watch the Network tab while you convert (no requests leave the page), or disconnect from the internet after the page loads and keep working.
Is base64 encryption?
No. Base64 is a reversible encoding, not encryption. Anyone can decode it instantly. Never use it to protect secrets; it only makes data safe to transport through text-only channels.
Is there a size limit or a fee?
The browser tool is free with no signup and comfortably handles files up to tens of megabytes (limited by your device's memory). For automated or bulk processing inside your own scripts and pipelines, use the paid REST API.
Related tools
Decode base64 and base64url to UTF-8 text in your browser. Handles missing padding and whitespace automatically. Free, private, instant.
Validate JSON in your browser with precise line and column error reporting. Get a structural summary of valid documents. Free, no upload.
Validate TOML files like pyproject.toml and Cargo.toml in your browser. Spec-compliant parser with clear error messages. Free and private.
Validate XML well-formedness in your browser with exact line and column error locations. Free, private, nothing leaves your machine.