인코딩
Base64
Base64 인코딩 및 디코딩 — 텍스트와 파일, 브라우저에서 바로.
Base64 is a binary-to-text encoding that represents arbitrary bytes using 64 printable ASCII characters (A–Z, a–z, 0–9, plus + and /). It exists so binary data — images, archives, cryptographic keys — can pass unchanged through channels that were designed for text only.
This tool encodes and decodes both plain text and files. Everything runs client-side in your browser: the input never leaves your machine, which makes it safe for tokens, private keys, and other sensitive data.
How to use it
- Encode text: pick the Encode / Text mode, paste your string, and copy the Base64 result.
- Encode a file: switch to File mode and choose a file — you get its Base64 representation, ready for a data URI or JSON field.
- Decode: switch to Decode mode and paste a Base64 string; if it decodes to a known file type you can download the original file.
Common uses
- Embedding small images or fonts directly in CSS/HTML via data: URIs.
- Putting binary payloads inside JSON, XML, or form fields.
- Encoding credentials for the HTTP Basic Authorization header.
- Storing or transmitting PEM keys and certificates.
Things to keep in mind
Base64 is not encryption — anyone can decode it. It only changes the representation of data, not its confidentiality.
Encoded output is about 33% larger than the input because every 3 bytes become 4 characters.
For URLs and file names use Base64URL, which swaps + and / for - and _ and often drops the = padding.
자주 묻는 질문
Base64는 정확히 무엇을 하는 인코딩인가요?
Base64는 바이너리 데이터를 A-Z, a-z, 0-9, +, / 총 64개의 문자만으로 표현하는 방식입니다. 이메일 첨부, JSON/URL 안에 이미지나 파일을 텍스트로 끼워 넣어야 할 때 주로 사용합니다.
이 도구를 사용하면 파일이 서버로 업로드되나요?
아니요. 인코딩과 디코딩 모두 브라우저 안에서만 실행되며 파일이나 텍스트는 서버로 전송되지 않습니다.
왜 Base64로 변환하면 결과 크기가 더 커지나요?
3바이트를 4개의 문자로 표현하는 방식이라 원본보다 약 33% 커집니다. 대용량 파일을 Base64로 다루면 용량이 늘어난다는 점을 감안하세요.
표준 Base64와 Base64URL은 어떻게 다른가요?
Base64URL은 +와 /를 각각 -와 _로 바꿔서 추가 percent-encoding 없이도 URL이나 파일 이름에 안전하게 넣을 수 있습니다. JWT가 바로 이 방식을 사용합니다.
문자열 끝의 = 기호는 무엇을 뜻하나요?
마지막 3바이트 블록에 몇 바이트가 부족한지 나타내는 패딩입니다. 항상 필요한 것은 아니며, 일부 시스템은 의도적으로 이를 생략합니다.