Skip to content
BeoHosting
BeoHosting

Free tool for developers

Base64 Encoder and Decoder — Convert Text and URL

Encode or decode text, URL parameters and data in Base64 format. Ideal for data URI, JWT, MIME email, Basic Authorization and CSS fonts. Everything is processed locally in the browser.

QUICK ANSWER

What is Base64 encoding and when is it used?

Base64 is a method of encoding binary data into an ASCII string. It is used when binary data needs to be transferred over protocols that only accept text (HTTP, email, JSON). Typical use cases: 1) Data URI for inline images in CSS and HTML, 2) Basic HTTP Authorization header, 3) MIME encoding of email attachments, 4) JWT (JSON Web Token) payload, 5) CSS @font-face for inline fonts, 6) JSON fields for small binary files. Base64 increases data size by ~33%, so it is not used for large files. Everything is processed locally in the browser — nothing is sent to the server.

  • Encoding and decoding of text + URL parameters
  • Local in the browser — without sending to the server
  • Ideal for data URI, JWT, MIME email, Basic Auth
  • BeoHosting hosting for developers from €4.31/mo

BeoHosting Team

10+ years of experience — Web hosting and infrastructure specialists

Last updated:

Base64 Encoder & Decoder

Enter text, then encode to Base64 or decode from Base64.

0 characters

Privacy: Everything is processed locally in the browser using the built-in btoa/atob functions. Your data is NOT sent to the server.

Use cases

Where is Base64 used?

Six most common uses of Base64 encoding in web development.

Data URI images

Inline images in HTML and CSS without a separate HTTP request. Ideal for small icons and SVG files.

data:image/png;base64,iVBORw0KGgo...

Basic HTTP Authorization

username:password encoded in Base64 is sent in the Authorization header for REST API authentication.

Authorization: Basic dXNlcjpwYXNz

MIME email attachment

Binary email attachments (images, documents) are encoded in Base64 for SMTP transfer.

Content-Transfer-Encoding: base64

JWT (JSON Web Token)

JWT header and payload are Base64URL encoded. Three segments separated by a dot.

eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoiam9obiJ9...

JSON binary data

Small binary files (images, PDF) in JSON fields through REST/GraphQL APIs.

{"file": "SGVsbG8gV29ybGQ="}

CSS inline fonts

@font-face with a Base64 encoded WOFF2 font — without additional HTTP requests.

@font-face { src: url(data:font/woff2;base64,...) }

Base64 — how encoding and decoding works

Base64 is a group of binary-to-text encodings that represent binary data in ASCII format using 64 different characters: uppercase and lowercase letters (A-Z, a-z), numbers (0-9), and two special characters (+ and /). The = sign is used as padding at the end if the input is not divisible by 3 bytes.

The original binary data is divided into groups of 3 bytes (24 bits). These 24 bits are then split into 4 groups of 6 bits each, and each group is mapped to one Base64 character. This is why the resulting string is ~33% longer than the original.

Base64URL — variant for URL parameters

Standard Base64 uses the characters + and /, which have special meaning in URLs. The Base64URL variant replaces + with - and / with _ to avoid URL encoding. The padding character = is often omitted. The JWT format uses Base64URL for header and payload.

Although Base64 is often mistakenly presented as a form of encryption, it is NOT encryption — it is only encoding. Anyone can trivially decode a Base64 string. To protect sensitive data, use AES-256 encryption or HTTPS/TLS for transfer.

Ready to launch your website?

SSL protection
Speed
24/7 support

Join 4,000+ satisfied customers. Free migration and 15-day money-back guarantee.

15-day money-back guarantee
Free migration15-day guarantee24/7 support

Frequently asked questions - Base64 Encoder

Answers to the most common questions about our services.

Base64 is a binary-to-text encoding method that represents binary data in ASCII text. It uses 64 different characters (A-Z, a-z, 0-9, +, /) plus = for padding. It is ideal for transferring binary data through text protocols (HTTP, email, JSON).

No. Base64 is only encoding, not encryption. Anyone can trivially decode a Base64 string. To protect sensitive data, use AES-256 encryption or the HTTPS protocol for transfer.

Standard Base64 uses the characters + and /, which have special meaning in URLs. The Base64URL variant replaces + with - and / with _ to avoid URL encoding. The JWT format uses Base64URL for header and payload segments.

Base64 converts every 3 bytes of original data into 4 Base64 characters, which increases the size by approximately 33%. This is why Base64 is not used for transferring large files — it is used for small binary data in a text context.

Absolutely. All encoding and decoding is performed exclusively in your browser using the built-in JavaScript functions btoa() and atob(). Nothing is sent to the server or stored.

Our guarantees for your peace of mind

Protected from every angle

15-day guarantee

We refund without questions in the first 15 days.

Free migration

We migrate your site with no downtime — you do nothing.

24/7 support

Our experts are here 24/7 via tickets and live chat.