Skip to content

Base64 Encoder

Encode text to Base64, including URL-safe output.

Quick Tool Overview

The Base64 Encoder converts text into the 64-character alphabet that lets binary travel through text-only channels — email, JSON, data URIs and HTTP headers. Text is encoded as UTF-8 first, which is the only correct way and the step naive encoders skip.

What it does
Encodes text into Base64
You give it
Any text, in any language
You get back
The Base64 string, standard or URL-safe
Best for
Data URIs, API payloads and email attachments
Text Tools Free, unlimited use No sign-up Runs in your browser

About the Base64 Encoder

Base64 turns arbitrary data into 64 printable characters, which is how binary travels through systems that only accept text: email attachments, JSON payloads, data URIs and HTTP headers all rely on it.

This encoder handles the two things that catch people out. Non-English text is encoded as UTF-8 first, which is the only correct way — the naive approach fails outright on any character above 255. And the URL-safe variant is available, which swaps the + and / characters for - and _ so the result can go in a URL or a filename without being percent-encoded. Line wrapping at 76 characters is there too, which the MIME email standard requires.

Key features of the Base64 Encoder

Correct UTF-8 handling

Text becomes UTF-8 bytes before encoding, so non-English input works rather than throwing an error.

URL-safe variant

Swaps + and / for - and _ so the result is safe in a URL or a filename, which is what JWTs use.

MIME line wrapping

Wrap at 76 characters when the output is going into an email, as the standard requires.

Optional padding removal

Drop the trailing = characters for the contexts that omit them.

Size shown

The encoded length beside the original, so the roughly one-third overhead is visible before you commit to it.

How to use the Base64 Encoder

  1. 1

    Paste your text

    Any text, in any language — UTF-8 is handled correctly.

  2. 2

    Choose the variant

    Standard Base64, or the URL-safe alphabet for use in a URL or filename.

  3. 3

    Set the line wrapping

    Wrap at 76 characters for MIME email, or leave it as one continuous string.

  4. 4

    Copy the result

    The encoded size is shown, which is always about a third larger than the input.

Frequently asked questions

No. It is an encoding, not a cipher — anyone can decode it instantly and no key is involved. Never use it to hide a password or anything else that matters.

Reviews of the Base64 Encoder

What people who use the Base64 Encoder think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Base64 Encoder. It takes half a minute and no account.

Write the first review

More text tools