Blog
Image Tools
Crop Image
Resize Image
Rotate & Flip
Compress Image
Photo Filters
Meme Generator
GIF Maker
Collage Maker
Watermark Image
Blur Image
Convert
JPG to PNG
PNG to JPG
HEIC to JPG
DNG to JPG
Image Converter
PDF to JPG
JPG to PDF
Merge PDF
Compress PDF
MP4 to MP3
Video to GIF
MOV to MP4
MP3 Converter
Video & Audio
Trim Video
Crop Video
Remove Audio
Text to Speech
Audio Cutter
MP3 Compressor
Design & Editor
Resume Builder
Design Editor
Add Text to Photo
Social Media Resizer
QR Code Generator
Signature Generator
More Tools
Word Counter
Password Generator
Random Picker
Dice Roller
Spinner Wheel
Favicon Generator
Barcode Generator
Browse All Tools

Text to Base64 Encoder

Turn any text into Base64, the safe letters-and-numbers format used in web addresses, emails, configuration files and data exchanges. Accents, symbols and emoji are encoded correctly as UTF-8, and you can choose URL-safe output or wrapped lines.

100% Free
No Sign-up
UTF-8
URL-Safe
Private · Nothing Saved Online
Text to Base64
Your Text
Input Characters—
Output Characters—
Lines In → Out—
Input Words—
Type or paste in the input box, or open a file. The result updates as you type.
Decode Base64 to text
Plain textType, paste or drop a file
Base64
Input—
Result—
Status—
Settings forYour text
Output
Wrapped lines are used in email and some older systems. Leave it off for web addresses and JSON.
File Name

How to Encode Text to Base64

Quick answer: type or paste your text; the Base64 version appears below straight away, ready to copy.

  1. 1

    Add your text

    Type, paste or open a file.

  2. 2

    Pick the format

    Standard, URL-safe or wrapped lines.

  3. 3

    Check the result

    It updates as you type.

  4. 4

    Copy or download

    Use the Base64 anywhere.

What You Get

Instant
As you type
UTF-8
Emoji and accents
URL-Safe
For web addresses
Line Wrapping
76 characters
Private
Nothing is uploaded
Any Device
Phone or computer

What Is Base64?

Base64 is a way of writing any data using only 64 safe characters: the letters A to Z and a to z, the digits 0 to 9, and + and /. Systems that were designed for plain text, such as email, web addresses, JSON, XML and configuration files, can carry Base64 without breaking. Every 3 bytes of input become 4 Base64 characters, so the result is about one third longer than the original. An = sign or two at the end pads the final group.

Accents, Symbols and Emoji

Many simple Base64 tools fail on anything beyond plain English letters, or produce results other systems cannot read. This encoder first turns your text into UTF-8 bytes, the standard used across the web, and then encodes those bytes. "Café ☕" therefore encodes correctly and decodes back to exactly the same text in any language or program that reads UTF-8.

URL-Safe and Wrapped Output

Standard Base64 uses + and /, which have special meanings in web addresses. URL-safe output replaces them with - and _ and drops the = padding, so the result can sit in a web address or file name without further encoding. This variant is used in tokens and many web services. Wrap lines at 76 characters splits long output into lines, the format used by email attachments and some certificate files.

Common Uses

Developers use Base64 to embed small data in JSON and XML, to send text through web services that only accept letters and numbers, to build authentication headers, and to store settings in environment variables. Testers use it to prepare sample data. It is also a quick way to keep a short piece of text from being read at a glance, but remember it is not encryption: anyone can decode it with Base64 to Text.

Example

"Hello, world!" becomes SGVsbG8sIHdvcmxkIQ==. With the URL-safe option, the same text gives SGVsbG8sIHdvcmxkIQ with no padding. To encode whole files such as PDFs instead of text, use PDF to Base64.

Good to Know

Base64 is case-sensitive: changing a single capital letter changes the decoded result, so always copy the whole output exactly. Line breaks in your input are encoded as well, which means "hello" and "hello" followed by a new line give different results. If a system rejects your Base64, check whether it expects the URL-safe alphabet, padding or no padding, and whether line breaks are allowed. The summary on the left shows the character counts, so you can see the one-third size increase for yourself.

Step by Step

Paste the text exactly as it must be encoded, including any line breaks it needs. Decide where the Base64 will go: for a JSON field, a header or a configuration value, keep the standard output on one line; for a web address or file name, tick URL-safe; for email bodies and certificate-style files, tick line wrapping. Copy the result with one click, or download it as a .txt file to attach or store.

Private, Free and Instant

The encoder is free and handles text up to 5 MB. There is no sign-up, no limit and nothing to install. Everything runs inside your browser, so passwords, tokens, customer data and private messages are never uploaded, logged or stored anywhere. The result updates instantly as you type or paste, and you can open a text file from your device and download the result as a new file. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android.

Encoding Text as Base64

Base64 turns bytes into 64 printable characters. Text is encoded as UTF-8 first, so accented letters take more space.

Uses

  • Embedding small data in URLs and JSON.
  • HTTP basic authentication headers, which are encoded, not protected.
  • Email attachments.

The output is about a third larger than the input. To decode, use Base64 to text.

Frequently Asked Questions

Questions about Base64 encoding

How do I encode text to Base64?

Type or paste your text. The Base64 version appears straight away.

Does it support emoji and accents?

Yes. Text is encoded as UTF-8, so every character is kept.

What is URL-safe Base64?

A version that uses - and _ instead of + and / and drops the = padding, so it is safe in web addresses.

Is Base64 encryption?

No. Anyone can decode it. Use it for transport and storage, not for secrets.

Why is Base64 longer than my text?

Every 3 bytes become 4 characters, so the result is about a third longer.

Is my text sent anywhere?

No. Encoding and decoding happen in your browser on your own device. Nothing is uploaded or stored.