64 Base64Toolkit
Language:

Base64 Encode

Convert text to Base64 live as you type. Free, no limits, and 100% in your browser.

0 chars · 0 bytes

0 chars · 0 bytes

Options

Recent conversions

Nothing yet — your last 10 conversions will appear here (stored only in this browser).

    About Base64 encoding

    Base64 encoding converts any text or binary data into a string built from 64 safe ASCII characters, so it can be embedded in JSON, YAML, XML, HTML, HTTP headers, and email without corruption. Every 3 bytes of input become 4 characters of output, which makes the result roughly 33% larger than the original.

    Typical encoding jobs for developers and DevOps engineers: creating values for Kubernetes Secret manifests, building Authorization: Basic headers, embedding images as data URIs, storing binary certificates in CI/CD secret variables, and preparing MIME email attachments. For URL or JWT contexts, enable URL-safe mode under Options — or use the dedicated Base64URL encoder.

    Encoding gotchas this tool avoids

    Frequently Asked Questions

    How do I encode text to Base64?

    Type or paste your text into the Plain Text box above. The Base64-encoded result appears instantly in the Base64 box — no button needed. Click Copy to grab the result.

    How do I Base64-encode a string on Linux or Windows?

    On Linux/macOS: echo -n "hello" | base64. In PowerShell: [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("hello")). Or skip the syntax entirely and use this page — it works identically on every OS.

    How do I encode credentials for HTTP Basic auth?

    Type username:password (with the colon) into the Plain Text box, then click the Basic Auth button — it copies a complete Authorization: Basic … header to your clipboard.

    Which charset should I choose when encoding?

    UTF-8 (the default) is correct for almost every modern use, including Kubernetes, JSON APIs, and JWT. Only switch to ASCII, ISO-8859-1, or UTF-16 when the system that will decode your data explicitly expects that charset.

    How do I create a Base64 value for a Kubernetes secret?

    Encode the value here with UTF-8 and no line wrapping, then paste it under data: in your Secret manifest. Watch out for trailing newlines — echo without -n adds one and is the #1 cause of broken secrets. This tool never adds a trailing newline. Or generate the entire manifest with our Kubernetes Secret tool.

    Related Tools