Base64 Encoder

Paste text or upload a file and get the Base64-encoded string instantly.

Paste text and click Encode to get its Base64 string: Hello, World! becomes SGVsbG8sIFdvcmxkIQ==.

Use the Base64 Encoder

Input

Base64 Output

Quick answer

Paste text and click Encode to get its Base64 string: Hello, World! becomes SGVsbG8sIFdvcmxkIQ==. Every 3 bytes turn into 4 characters, so the output is about a third longer, padded with = at the end. Pick a file instead to encode an image or any other file.

Examples

InputBase64 output
Hello, World!SGVsbG8sIFdvcmxkIQ==
HiSGk=
user:passdXNlcjpwYXNz
caféY2Fmw6k=
<<???>>PDw/Pz8+Pg==
<<???>> (URL-safe)PDw_Pz8-Pg==

Paste your text, then click Encode.

Summary

Paste text or upload a file and get the Base64-encoded string instantly.

How it works

  1. Paste text into the input area or click "Choose file" to upload a binary file.
  2. Select Standard or URL-safe alphabet as needed.
  3. Click Encode to convert the text. A file is encoded as soon as you pick it, so choose the alphabet first.
  4. Copy the Base64 output with the Copy button.

Use cases

  • Embedding images as data URIs in CSS
  • Encoding credentials for HTTP Basic Auth headers
  • Passing binary data in JSON API payloads

Frequently Asked Questions

Last updated: 2026-05-29 · Reviewed by Nham Vu