Hacker News new | ask | show | jobs
by KilledByAPixel 2397 days ago
As far as I know base64 is not guaranteed to be uri safe, though most of the time you should be fine. However more importantly converting to base64 automatically increases the size by 33%

https://developer.mozilla.org/en-US/docs/Web/API/WindowBase6...

1 comments

The parent poster was referring to the "base64url" variant of Base64 which uses `-` and `_` as the two special characters and leaves out the useless padding, making it url safe. (The 33% expansion still applies though)

https://tools.ietf.org/html/rfc4648#page-7