Preskoči na sadržaj
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.

TL;DR

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.66/mo

BeoHosting Team

10+ godina iskustva — Stručnjaci za web hosting i infrastrukturu

Poslednje ažurirano:

Base64 Enkoder & Dekoder

Unesite tekst, zatim enkodirajte u Base64 ili dekodirajte iz Base64.

0 karaktera

Privatnost: Sve se obrađuje lokalno u pregledacu pomoću ugrađenih btoa/atob funkcija. Vaši podaci se NE šalju na 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.

Spremni da pokrenete svoj sajt?

SSL zaštita
Brzina
24/7 podrška

Pridružite se 4.000+ zadovoljnih korisnika. Besplatna migracija i 15 dana garancije povrata novca.

15 dana garancija povrata novca
Besplatna migracija15 dana garancija24/7 podrška

Frequently asked questions - Base64 Encoder

Odgovori na najčešća pitanja o našim uslugama.

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.

Naše garancije za vaš mir

Zaštićeni ste sa svake strane

15 dana garancije

Vraćamo novac bez pitanja u prvih 15 dana.

Besplatna migracija

Mi prebacimo vaš sajt bez prekida — vi ništa ne radite.

24/7 podrška

Naši stručnjaci su tu 24/7 kroz tikete i live chat.