How to decode or encode Base64 text
- Select Decode or Encode under Mode.
- Choose Standard Base64 or Base64URL and paste up to 1 MiB into Input.
- Select the Decode or Encode button and read Output. Select Copy result to copy it.
Decode Base64 or Base64URL strings to UTF-8 text
Paste an encoded payload into Input and select Decode. Standard Base64 (RFC 4648 §4) uses +, / and = padding, while URL-safe Base64URL (RFC 4648 §5, used in JWT headers, payloads and OAuth tokens) replaces + with - and / with _. With the matching alphabet selected, the Base64 decoder strips line wraps and spaces and restores omitted = padding automatically—for example, 5L2g5aW9 decodes to 你好. Unlike raw JavaScript atob() and btoa(), which only handle Latin-1 characters, this tool validates full multi-byte UTF-8 sequences and reports malformed padding or non-UTF-8 bytes clearly.
Use the Base64 encoder for UTF-8 strings
Switch Mode to Encode to use the tool as a Base64 encoder for plain text, JSON snippets, API credentials or multi-language strings including accented letters, CJK characters and emoji. Choose Standard Base64 when a header, MIME body or configuration file expects +, / and = padding, or choose Base64URL to Base64 encode strings for URLs, filenames and tokens without trailing = characters. Remember that Base64 is a binary-to-text encoding rather than encryption: anyone can decode the output.
Convert images, URLs and HTML entities with matching tools
For image files, data:image/...;base64, Data URLs or ready-to-paste <img>, CSS and Markdown snippets, open Image to Base64. Use the URL decoder for percent-encoded strings such as %20 or query parameters, and the HTML entity decoder for character references such as & or <. Up to 1 MiB of text is processed per operation on your device.
To compute a digest from your original text or file, open the hash generator.
Frequently asked questions
Which text can I encode?
UTF-8 text can include accented characters, non-Latin scripts and emoji.
What does Base64URL change?
It uses hyphen and underscore in place of plus and slash. The encoder omits trailing padding in this mode.
Can I paste wrapped or unpadded Base64?
Yes. The decoder accepts ASCII whitespace and omitted padding when the remaining characters form a valid value.
Why did the decoded bytes fail the UTF-8 check?
The input may represent binary data or text in another character encoding. This page decodes bytes as UTF-8.
How do I convert an image?
Use Image to Base64 for files and Data URLs. This page accepts plain text and raw Base64 input.
Last updated November 11, 2026