Home Text ToolsBase64 Encoder

Base64 Encoder

Encode text to Base64 (UTF-8 safe), right in your browser.

SGVsbG8gV29ybGQ=
Base64SGVsbG8gV29ybGQ=
Length16

Encode any text to Base64 — the format used to safely carry data in URLs, emails and config files. Runs entirely in your browser; nothing is uploaded.

Formula / method

UTF-8 bytes → Base64 (A–Z, a–z, 0–9, +, /)

Examples

Hello World
SGVsbG8gV29ybGQ=
UtilGears
VXRpbEdlYXJz

What Base64 encoding does

Base64 turns arbitrary bytes into a safe set of 64 text characters, so binary or awkward data can travel through systems that expect plain text — email, data URLs, JSON fields and config files. It is an encoding, not encryption: it hides nothing, it only reshapes.

When you will reach for it

Common uses include embedding a small image directly in HTML or CSS, storing binary data in a text-only field, and encoding credentials for certain HTTP headers. Encoding adds about a third to the size. To reverse it, use the Base64 Decoder; to learn more, see the What Is Base64 guide.

Where it's used

  • Embedding small images or fonts directly in HTML and CSS as data URLs
  • Storing binary data inside a JSON, XML, or plain-text database field
  • Building HTTP Basic Auth headers, which encode user:password
  • Encoding attachments and non-ASCII content in email via MIME
  • Passing binary payloads safely through text-only APIs and config files

Real-world examples

  • 'Hello World' encodes to SGVsbG8gV29ybGQ=, safe to drop into a JSON string.
  • A small PNG icon becomes a data:image/png;base64,... URL embedded straight in a stylesheet.
  • The credentials user:pass encode to dXNlcjpwYXNz for an Authorization: Basic header.

A bit of history

The scheme now known as Base64 was first standardized in the Privacy-Enhanced Mail (PEM) specification, RFC 989, in 1987, and became widespread when MIME adopted it to carry attachments in email in the 1990s.

Did you know?

Base64 grows data by about a third, since every 3 bytes become 4 text characters. The trailing = signs you often see are padding that keeps the output aligned to that group of four.

FAQ

Is Base64 encryption?

No. Base64 is an encoding, not encryption — anyone can decode it. It is used to safely represent binary data as text, not to keep data secret.

Related tools

Related guides