Base64
바이너리나 텍스트를 운반하기 쉬운 문자 조합으로 바꿉니다. 데이터 자체를 다른 표기로 변환하는 데 가깝습니다.
🔒 브라우저 내부 처리
둘 다 문자열을 “안전하게 바꾼다”는 느낌이 있지만, Base64와 URL 인코딩은 완전히 다른 목적과 실패 지점을 갖습니다.
Both can make strings feel safer, but Base64 and URL encoding solve different transport problems and fail in different places.
Difference
바이너리나 텍스트를 운반하기 쉬운 문자 조합으로 바꿉니다. 데이터 자체를 다른 표기로 변환하는 데 가깝습니다.
URL 안에서 의미가 깨질 수 있는 문자만 이스케이프합니다. 원래 문자열을 URL 문법에 맞게 안전하게 보내는 데 가깝습니다.
쿼리 파라미터를 Base64만 해서 해결되는 것도 아니고, 바이너리 파일을 URL 인코딩으로 보내는 것도 맞지 않습니다.
Difference
Turns binary or text into a transport-friendly character sequence. It is mainly a representation change.
Escapes characters that would break URL parsing. It preserves meaning inside a URL rather than transforming the data model itself.
Encoding query params with Base64 alone is not the same as making them URL-safe, and URL encoding is not a substitute for binary-to-text transport.
Use Cases
구조화된 값이나 바이너리 조각을 문자열로 실어야 할 때는 Base64가 더 자주 나옵니다. 다만 URL 경로로 넘길 땐 URL-safe 변형까지 고려해야 합니다.
공백, 한글, 예약 문자 때문에 URL이 깨질 수 있는 상황이면 URL 인코딩이 먼저입니다. 특히 OAuth 콜백이나 결제 리턴 URL에서 자주 중요합니다.
일부 시스템은 먼저 Base64로 구조를 바꾼 뒤, 그 값을 다시 URL 파라미터에 실어 보냅니다. 이럴 때는 어느 단계에서 실패했는지 순서를 나눠서 봐야 합니다.
Use Cases
Base64 shows up often when structured or binary data needs to travel as text. If it later moves through a URL, URL-safe variants may still matter.
URL encoding comes first when spaces, Korean text, or reserved characters can break a callback or redirect chain.
Some systems Base64-encode a value first and then place it in a query parameter. Debugging gets easier when you identify which layer transformed the value.
Workflow
Workflow