Skip to content
b64codec

Private by design — runs entirely in your browser

Base64 encoder & decoder

Convert text, files and images to and from Base64 instantly. UTF-8 safe, URL-safe aware, and your data never leaves your device.

Text (UTF-8)

0 chars0 B

Base64

0 chars

More tools

How Base64 works

Base64 turns any binary data into plain text using just 64 safe characters: A–Z, a–z, 0–9, + and /, with = for padding. Because 26 = 64, each character carries exactly 6 bits, so every 3 bytes (24 bits) of input become 4 characters of output.

up to 9 bytes — try 1 or 2 characters to see padding

1Text → bytes (UTF-8) → 8-bit binary

01000001
"A" = 65
01000010
"B" = 66
01000011
"C" = 67

2Regroup the bits into 6-bit chunks → numbers 0–63 → characters

010000
16 → Q
010100
20 → U
001001
9 → J
000011
3 → D

3Result

QUJD

The Base64 alphabet (index → character)
0A
1B
2C
3D
4E
5F
6G
7H
8I
9J
10K
11L
12M
13N
14O
15P
16Q
17R
18S
19T
20U
21V
22W
23X
24Y
25Z
26a
27b
28c
29d
30e
31f
32g
33h
34i
35j
36k
37l
38m
39n
40o
41p
42q
43r
44s
45t
46u
47v
48w
49x
50y
51z
520
531
542
553
564
575
586
597
608
619
62+
63/

Decoding is the same process in reverse: each character is looked up to get its 6-bit value, the bits are joined back together and split into 8-bit bytes, and any padding is discarded.

Frequently asked questions

Is my data sent to a server?+

No. All encoding and decoding happens in JavaScript inside your browser. Nothing you type, paste or drop is uploaded — you can even use the site offline once it has loaded.

Does it handle emoji and non-English text?+

Yes. Text is encoded as UTF-8 before conversion, so emoji, accents and scripts like 中文 or العربية round-trip correctly. (Plain btoa() in JavaScript fails on these.)

What is URL-safe Base64?+

A variant defined in RFC 4648 §5 that uses - and _ instead of + and /, so the result can be placed in URLs and file names without escaping. It's used by JWTs and many web APIs. The decoder here accepts both forms automatically.

Is Base64 encryption?+

No. Base64 is an encoding, not encryption — anyone can decode it. Never use it to hide passwords or secrets.

Why is the Base64 output bigger than the input?+

Every 3 bytes of input become 4 characters of output, so Base64 is about 33% larger (plus line breaks, if you wrap it).