Menu

Post image 1
Post image 2
1 / 2
0

Base64 is not encryption - here's what it actually does

DEV Community·Mike Knights·19 days ago
#6Nu0aApn
Reading 0:00
15s threshold

Base64 comes up constantly - in JWTs, email attachments, data URIs, API payloads. Most developers have used it dozens of times. But a surprising number have a slightly wrong mental model, and that leads to misuse. The biggest mistake: treating it as a form of obfuscation or lightweight encryption. It isn't. What it actually does Base64 takes binary data and converts it into a string of 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). The original data is completely recoverable with no key required. Anyone who sees the output can decode it in seconds. The reason it exists has nothing to do with security. Many systems that transport text - email, HTTP headers, JSON, HTML attributes - were never designed to handle arbitrary binary data. If you embed raw binary in those systems, you get corruption or parsing errors. Base64 gives binary a safe disguise for the journey. Where you run into it JWTs. A JSON Web Token is three Base64url-encoded sections separated by dots.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More