🔒 텍스트 → Base64 인코딩
🔓 Base64 → 텍스트 디코딩
📥 원본 텍스트 입력
📤 Base64 결과

Base64란?

Base64는 바이너리 데이터를 64개의 ASCII 문자(A-Z, a-z, 0-9, +, /)로 표현하는 인코딩 방식입니다. 텍스트 기반 프로토콜(이메일, HTTP)에서 바이너리 데이터를 안전하게 전송하기 위해 개발되었습니다.

Base64 주요 활용 사례

JavaScript에서 Base64 사용법

// 인코딩
const encoded = btoa('Hello, 테크팁KR');

// 디코딩
const decoded = atob(encoded);

// 한국어(유니코드) 처리
const encodeKR = str => btoa(unescape(encodeURIComponent(str)));
const decodeKR = str => decodeURIComponent(escape(atob(str)));

Python에서 Base64 사용법

import base64

# 인코딩
encoded = base64.b64encode(b'Hello, TechTipKR').decode('utf-8')

# 디코딩
decoded = base64.b64decode(encoded).decode('utf-8')

# URL-safe Base64
url_safe = base64.urlsafe_b64encode(b'data').decode('utf-8')

🛠 다른 도구