kone
소미소프트
소미소프트

개인용 base64 대체 사이트

유틸
36,902 views · 33 points

base64 광고 뜨길래 만듬

아래 코드 메모장에 복붙하고 .txt를 .html 로 바꾸면 됨

1

로 나옴

난 이거 파일로 만들고 크롬에서 북마크 해놔서 쓰는 중

<!DOCTYPE html>

<html lang="ko">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Base64 자동 디코더</title>

<style>

* {

box-sizing: border-box;

margin: 0;

padding: 0;

}

body {

font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

background-color: #f4f6f9;

display: flex;

justify-content: center;

align-items: center;

min-height: 100vh;

padding: 20px;

}

.container {

background: #ffffff;

padding: 30px;

border-radius: 12px;

box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

width: 100%;

max-width: 600px;

}

h2 {

margin-bottom: 20px;

color: #333;

text-align: center;

}

.input-group {

margin-bottom: 20px;

}

label {

display: block;

margin-bottom: 8px;

font-weight: bold;

color: #555;

}

textarea {

width: 100%;

height: 100px;

padding: 12px;

border: 1px solid #ccc;

border-radius: 6px;

font-size: 14px;

resize: vertical;

outline: none;

}

textarea:focus {

border-color: #007bff;

}

.btn-group {

display: flex;

gap: 10px;

margin-bottom: 20px;

}

button {

flex: 1;

padding: 12px;

background-color: #007bff;

color: white;

border: none;

border-radius: 6px;

font-size: 16px;

cursor: pointer;

transition: background-color 0.2s;

}

button:hover {

background-color: #0056b3;

}

button.reset-btn {

background-color: #6c757d;

}

button.reset-btn:hover {

background-color: #5a6268;

}

.result-box {

background-color: #e9ecef;

padding: 15px;

border-radius: 6px;

min-height: 60px;

word-break: break-all;

font-family: monospace;

font-size: 15px;

color: #212529;

}

</style>

</head>

<body>

<div class="container">

<h2>Base64 자동 디코더</h2>

<div class="input-group">

<label for="encodedInput">Base64 문자열 입력</label>

<textarea id="encodedInput" placeholder="여기에 Base64 문자열을 붙여넣으세요..."></textarea>

</div>

<div class="btn-group">

<button onclick="decodeText()">해독하기</button>

<button class="reset-btn" onclick="resetForm()">초기화</button>

</div>

<div class="input-group">

<label>디코딩 결과</label>

<div id="resultOutput" class="result-box">결과가 여기에 표시됩니다.</div>

</div>

</div>

<script>

function decodeBase64Utf8(str) {

try {

// 공백 및 전후 여백 제거

const cleanStr = str.trim();

if (!cleanStr) return "";

// Base64 디코딩 (한글 및 특수문자 UTF-8 깨짐 방지)

const binaryString = atob(cleanStr);

const bytes = new Uint8Array(binaryString.length);

for (let i = 0; i < binaryString.length; i++) {

bytes[i] = binaryString.charCodeAt(i);

}

return new TextDecoder().decode(bytes);

} catch (e) {

return "❌ 올바른 Base64 형식이 아닙니다.";

}

}

function decodeText() {

const input = document.getElementById('encodedInput').value;

const resultBox = document.getElementById('resultOutput');

if (!input.trim()) {

resultBox.innerText = "문자열을 입력해 주세요.";

return;

}

const decoded = decodeBase64Utf8(input);

resultBox.innerText = decoded;

}

function resetForm() {

document.getElementById('encodedInput').value = '';

document.getElementById('resultOutput').innerText = '결과가 여기에 표시됩니다.';

}

// 실시간 자동 입력 감지 (타이핑 시 즉시 디코딩)

document.getElementById('encodedInput').addEventListener('input', decodeText);

</script>

</body>

</html>

33
3 comments
[deleted] (edited )

Deleted comment.

(edited )
노트패드++에 기본으로 탑재되어 있는 기능인지라요. 모르는 사람 너무 많다요.
[deleted] (edited )

Deleted comment.

All
Title
Body