Base64 Encode / Decode
Encode and decode Base64 and Base64URL online, UTF-8 safe — entirely in your browser.
About this tool
Convert text to Base64 and back, with full UTF-8 support — emoji and non-Latin scripts round-trip correctly, unlike a naive btoa() call. Decoding accepts both standard Base64 and the URL-safe variant, with or without padding.
Switching between Encode and Decode carries the current output over as the new input, so verifying a round-trip takes one click.
Frequently asked questions
What is the difference between Base64 and Base64URL?+
Base64URL replaces + with - and / with _ and usually drops the = padding, making the result safe inside URLs and filenames. JWTs use Base64URL. This tool decodes both automatically.
Is Base64 encryption?+
No — it is an encoding, trivially reversible by anyone. It exists to move binary data through text-only channels, not to protect it. Never treat Base64 as a way to hide secrets.
Why does the output end with = signs?+
Padding: Base64 maps 3 bytes to 4 characters, so inputs not divisible by 3 are padded. One or two = characters at the end are normal, and this decoder also accepts input without them.
Why does btoa() fail on Korean or emoji in my code?+
btoa() only handles Latin-1 code points. Encode the string as UTF-8 bytes first (TextEncoder) and then Base64 the bytes — which is exactly what this tool does.