Base64 Encoder / Decoder

About this tool

Text is first turned into UTF-8 bytes (TextEncoder) and then Base64-encoded, because the browser's btoa fails on Korean and other non-Latin text. For example, "안녕 hello" becomes 7JWI64WVIGhlbGxv.

URL-safe uses - and _ instead of + and / and drops the trailing =, the format used by JWTs and URL parameters. Decoding accepts both forms and ignores whitespace or missing padding.

Base64 turns every 3 bytes into 4 characters, so output is about 33% longer. It is not encryption — anyone can decode it. If the decoded bytes are not UTF-8 text (binary such as an image), an error is shown.

FAQ

Is Base64 encryption?

No. It is an encoding anyone can reverse — never use it to hide passwords or keys.

When should I use URL-safe?

When the result goes into URLs, query parameters or JWTs, where + / = cause problems.

Is my input stored?

No. It is converted in your browser only.

Related tools