Base64 vs URL Encoding: What's the Difference and When to Use Each

Base64 encoder/decoder Two encodings, two different jobs Both Base64 and URL encoding replace “unsafe” characters with safe ones. That surface similarity is why they get mixed up — and why people sometimes apply both when one would do, or apply the wrong one entirely. The short version: Base64 makes binary data survive a text-only channel. Percent-encoding makes text survive a URL. What each one actually does Base64 rewrites bytes using a 64-character alphabet (A–Z a–z 0–9 + /, plus = padding). Every 3 bytes become 4 characters, so output grows by about 33%. ...

September 12, 2026 · 3 min · 567 words · NavShelf Team

URL Encoding Explained: How to Encode Query Parameters Correctly

The broken link problem You build a search URL and it works fine in English, then breaks the moment a user types anything interesting: https://example.com/search?q=书签管理 & page=2 The server sees q=书签管理 and a stray parameter called page. The & that was supposed to be part of the query value has been read as a separator. The same thing happens with #, =, ?, + and spaces. The fix is percent-encoding (URL encoding): replace unsafe characters with % followed by two hexadecimal digits representing the UTF-8 byte. ...

September 10, 2026 · 3 min · 631 words · NavShelf Team