-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
100 lines (91 loc) · 3.94 KB
/
index.html
File metadata and controls
100 lines (91 loc) · 3.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Base64 Encoder/Decoder</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<header>
<h1>Base64 Encoder/Decoder</h1>
<p>Convert text to Base64 and back with support for URL-safe encoding</p>
</header>
<div class="tool-section">
<div class="options">
<label class="toggle-switch">
<input type="checkbox" id="urlSafeToggle">
<span class="slider"></span>
<span class="label">URL-Safe Base64</span>
</label>
<div class="info-tooltip">
<span class="info-icon">ⓘ</span>
<div class="tooltip-content">
URL-Safe Base64 uses '-' and '_' instead of '+' and '/', and omits padding '='
</div>
</div>
</div>
<div class="converter-section">
<div class="input-group">
<label for="plaintext">Plain Text</label>
<textarea id="plaintext" placeholder="Enter text to encode..."></textarea>
<div class="button-group">
<button id="encodeBtn" class="btn primary">Encode ↓</button>
<button id="clearPlainBtn" class="btn secondary">Clear</button>
</div>
</div>
<div class="input-group">
<label for="base64text">Base64 Encoded</label>
<textarea id="base64text" placeholder="Enter Base64 to decode..."></textarea>
<div class="button-group">
<button id="decodeBtn" class="btn primary">Decode ↑</button>
<button id="clearBase64Btn" class="btn secondary">Clear</button>
</div>
</div>
</div>
<div class="actions">
<button id="copyPlainBtn" class="btn copy-btn">Copy Plain Text</button>
<button id="copyBase64Btn" class="btn copy-btn">Copy Base64</button>
<button id="swapBtn" class="btn swap-btn">Swap ⇄</button>
</div>
<div class="info-panel">
<div class="info-item">
<span class="info-label">Input Length:</span>
<span id="inputLength">0</span>
</div>
<div class="info-item">
<span class="info-label">Output Length:</span>
<span id="outputLength">0</span>
</div>
<div class="info-item">
<span class="info-label">Encoding Type:</span>
<span id="encodingType">Standard</span>
</div>
</div>
</div>
<div class="examples-section">
<h3>Examples</h3>
<div class="example-grid">
<div class="example-item">
<h4>Standard Base64</h4>
<p><strong>Input:</strong> Hello, World!</p>
<p><strong>Output:</strong> SGVsbG8sIFdvcmxkIQ==</p>
</div>
<div class="example-item">
<h4>URL-Safe Base64</h4>
<p><strong>Input:</strong> Hello, World!</p>
<p><strong>Output:</strong> SGVsbG8sIFdvcmxkIQ</p>
</div>
</div>
</div>
<footer>
<p>© 2025 <a href="https://www.webprofusion.com">webprofusion.com</a> - processing is local to your browser and does not leave your own computer</p>
</footer>
</div>
<div id="notification" class="notification hidden">
<span id="notificationText"></span>
</div>
<script src="script.js"></script>
</body>
</html>