Base64 Encode
Encode text to Base64 format — paste, encode, and copy instantly.
Encoded Base64 will appear here...About Base64 Encode
Base64 Encode is a free online tool that converts plain text, numbers, or any UTF-8 string into Base64-encoded format. Base64 is a binary-to-text encoding scheme that represents data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). Because the resulting string contains no special characters, it travels safely through systems that would otherwise corrupt raw binary — MIME email, HTTP headers, JSON payloads, and URL query strings all accept it without escaping.
You would reach for this tool when a system you are integrating with demands a Base64 string rather than raw text. Typical triggers include constructing a Basic Auth header (username:password encoded to Base64), writing a data URI to embed a small string directly in HTML or CSS, passing credentials in a CI/CD environment variable, or preparing binary content for a REST API that only accepts JSON. The encoder uses the native TextEncoder and btoa() APIs internally, so multi-byte characters — including accented letters, CJK text, and emojis — are first converted to their correct UTF-8 byte representation before encoding, which avoids the silent corruption that simpler implementations produce.
All encoding runs entirely inside your browser. Nothing is uploaded, logged, or transmitted to any server. You can safely encode API keys, tokens, passwords, or any proprietary string without worrying about data leaving your machine. The tool is free, requires no account, and has no input size limit beyond what your browser can handle.
Key Features
Correct UTF-8 handling
Text is first converted to UTF-8 bytes via TextEncoder before btoa() is called. Accented characters, CJK text, and emojis encode without producing garbled output.
100% client-side
Encoding runs in the browser using built-in JavaScript APIs. No data ever leaves your machine, making it safe for API keys, tokens, and passwords.
Instant feedback
Paste your text, click Encode, and the Base64 string appears immediately. No page reload, no network round-trip.
One-click copy
A copy button transfers the full encoded string to your clipboard so you can paste it directly into a header, config file, or terminal.
Handles any plain-text input
Works on short tokens, multi-line JSON, connection strings, passwords, and anything else you can type or paste — not limited to ASCII.
No sign-up or rate limits
Encode as many strings as you need without creating an account, waiting for a quota to reset, or paying for a plan.
How to Use
Enter Text
Type or paste the text you want to encode into the input pane.
Encode
Click "Encode" to convert your text to Base64 format.
Copy Result
Use the copy button to grab your Base64-encoded output.
Example
A plain-text API credential is encoded to Base64. The resulting string is safe to include in an Authorization header or a JSON config.
username:s3cr3t-p@ssword dXNlcm5hbWU6czNjcjN0LXBAc3N3b3Jk Common Use Cases
- arrow_circle_right
Building HTTP Basic Auth headers
The HTTP Basic Authentication scheme requires credentials in the form username:password encoded as Base64 and prefixed with "Basic ". This tool produces that encoded string in one step, ready to paste into an Authorization header.
- arrow_circle_right
Creating data URIs for inline content
A data URI embeds small resources directly in HTML or CSS using the format data:type;base64,<encoded>. Encode short SVG icons, plain text, or JSON blobs here and use the output directly in your markup without an extra HTTP request.
- arrow_circle_right
Encoding secrets for CI/CD environment variables
Many CI platforms store only plain-text environment variables. Base64-encoding a certificate, key file, or multi-line config value lets you store it as a single variable and decode it at build time.
- arrow_circle_right
Passing binary-safe strings through JSON APIs
JSON does not natively carry binary data. When an API expects a Base64 field — a PDF attachment, a cryptographic signature, or a serialized object — encode the value here before placing it in the JSON body.
- arrow_circle_right
Testing Base64 decoders and parsers
When writing or debugging a decoder, you need a known-good encoded value to test against. Encode a string whose bytes you can predict and verify that your decoder returns the original input exactly.