BASE64 CONVERTER

Encode and decode Base64 online. Convert text, files, and images to Base64 data URIs.

CLIENT
100% client-side

Everything runs locally in your browser. Your data never leaves your device - no uploads, no server processing.

All processing happens directly on your machine using JavaScript. Close the tab and everything is gone. No data ever reaches any external server.

INPUT
OUTPUT
Conversion mode

Drop files here or start typing

TXT JSON XML
0 INPUT
0 OUTPUT
1.33x RATIO

Base64 character reference

Base64 uses 64 characters: A-Z, a-z, 0-9, + and /. The = symbol is used for padding.

Index
Binary
Char
0
000000
A
1
000001
B
2
000010
C
3
000011
D
4
000100
E
5
000101
F
6
000110
G
7
000111
H
8
001000
I
9
001001
J
10
001010
K
11
001011
L
12
001100
M
13
001101
N
14
001110
O
15
001111
P
Index
Binary
Char
16
010000
Q
17
010001
R
18
010010
S
19
010011
T
20
010100
U
21
010101
V
22
010110
W
23
010111
X
24
011000
Y
25
011001
Z
26
011010
a
27
011011
b
28
011100
c
29
011101
d
30
011110
e
31
011111
f
Index
Binary
Char
32
100000
g
33
100001
h
34
100010
i
35
100011
j
36
100100
k
37
100101
l
38
100110
m
39
100111
n
40
101000
o
41
101001
p
42
101010
q
43
101011
r
44
101100
s
45
101101
t
46
101110
u
47
101111
v
Index
Binary
Char
48
110000
w
49
110001
x
50
110010
y
51
110011
z
52
110100
0
53
110101
1
54
110110
2
55
110111
3
56
111000
4
57
111001
5
58
111010
6
59
111011
7
60
111100
8
61
111101
9
62
111110
+
63
111111
/

Conversion analytics

0
CONVERSIONS
0
COPIED
0
CHARS PROCESSED
Text
FAVORITE MODE
0
AVG SIZE
100%
EFFICIENCY

How to encode and decode Base64

Convert text to Base64, decode Base64 strings, or turn images into data URIs

Full Documentation Docs
1

Choose mode

Select text encode, text decode, or image mode

2

Input data

Type, paste, drag and drop, or upload your file

3

Get results

Copy Base64 string or download result

Your data stays in browser
Real-time conversion
11 image formats
Drag, drop, or paste

Why choose this Base64 encoder and decoder?

RFC 4648 compliant Base64 converter for text and images

Image statistics and metadata

Detailed image analysis: resolution, MIME type, file size, color channels, and bit depth for every conversion.

One-click swap and reverse

Instantly reverse input and output. Convert encoded data back or switch conversion direction with one click.

Paste image from clipboard

Paste images directly from clipboard. Convert screenshots and copied images to Base64 instantly without saving files first.

11 image formats with SVG

Full support for JPG, PNG, GIF, WEBP, AVIF, BMP, TIFF, ICO, HEIC, HEIF, and SVG. HEIC and TIFF files auto-convert for browser compatibility.

50 MB upload limit

Upload large files up to 50 MB. Drag & drop or click to upload for instant Base64 conversion.

Trim and clean Base64 input

Toggle to automatically remove leading and trailing whitespace for cleaner, more accurate conversions.

Frequently Asked Questions

Common questions about Base64 encoding, decoding, and data URIs

What is Base64 encoding?

Base64 encodes binary data into text using 64 characters (A-Z, a-z, 0-9, +, /). Defined by RFC 4648, it is used in emails (MIME), HTML/CSS data URIs, JSON web tokens, and API data transfer.

Is Base64 encoding the same as encryption?

No. Base64 is reversible encoding, not encryption. Anyone can decode a Base64 string back to the original data without a key. For security, use actual encryption (AES, RSA) and then optionally Base64-encode the result for safe transport.

How to decode Base64 online?

Paste your Base64 string into the tool, click Decode, and you'll instantly get the original text or file.

How do I convert an image to Base64 for HTML or CSS?

Upload your image in the Image Encode mode. The tool generates a Base64 data URI string (data:image/png;base64,...) that you can paste directly into HTML img src attributes or CSS background-image properties. Toggle the data URI prefix on or off as needed.

How to encode a file to Base64?

Upload your file, select Encode, and the tool generates a Base64 string you can copy or download.

What image formats are supported?

11 formats are supported: JPG, PNG, GIF, WEBP, AVIF, BMP, TIFF, ICO, HEIC, HEIF, and SVG. HEIC files auto-convert to JPEG and TIFF files auto-convert to PNG for browser compatibility. Files up to 50 MB are accepted.

Is my data safe with this tool?

Yes. All encoding and decoding runs locally in your browser using JavaScript. Your text and images are never uploaded to any server. Close the tab and all data is gone from memory.

Why is Base64 output larger than the original?

Base64 encoding increases data size by approximately 33%. Every 3 bytes of input become 4 Base64 characters. A 1 MB image produces roughly 1.33 MB of Base64 text. This is the trade-off for representing binary data as safe ASCII text.

Technical Details

How this RFC 4648 Base64 encoder processes text and images

RFC 4648 Encoding Engine

This Base64 encoder implements the RFC 4648 standard using the browser's native btoa() and atob() functions. Text input is processed as UTF-8 with encodeURIComponent for proper multi-byte character handling. File encoding uses the FileReader API with ArrayBuffer conversion for binary-accurate Base64 output.

Zero-Upload Privacy

All encoding and decoding runs in your browser using client-side JavaScript. Your text and images are never transmitted to any server. Processing happens in volatile memory - close the tab and all data is gone. Zero server communication for any conversion.

11 Image Formats with Auto-Conversion

Supports 11 image formats: JPG, PNG, GIF, WEBP, AVIF, BMP, TIFF, ICO, HEIC, HEIF, and SVG. HEIC and HEIF files auto-convert to JPEG via the heic2any library. TIFF files auto-convert to PNG via the UTIF library. Output includes optional data URI prefix (data:image/type;base64,...) ready for HTML img tags or CSS background properties.

Performance

Sub-10ms encoding for standard text inputs. File processing uses streaming ArrayBuffer conversion for memory efficiency. No external libraries loaded until the first user action - initial page load stays under 1 second with zero render-blocking resources.

Data URI Output for HTML and CSS

Image-to-Base64 mode generates complete data URI strings in the format data:image/type;base64,... that can be embedded directly in HTML src attributes or CSS url() declarations. Toggle the data URI prefix on or off depending on your use case. Raw Base64 output is available for API payloads and database storage.

Multiple Input Methods

Type or paste text directly, drag and drop files onto the input area, upload via file picker, or paste images from clipboard (Ctrl+V). The tool auto-detects input type and switches conversion mode accordingly. Supported text file types include TXT, JSON, XML, HTML, CSS, and JS.