Base64 encode and decode
Encode text as Base64 or decode it back to text in your browser.
How it works, and what stays on your device
Enter text and select Encode, or enter Base64 and select Decode. Choose the URL-safe alphabet when you need it. Encoding can include or omit padding; decoding accepts either.
Your input stays on your device. Base64 is an encoding, not encryption.
Frequently asked questions
What is Base64?
Base64 represents bytes as text using a 64-character alphabet. It does not protect or encrypt the content.
What is URL-safe Base64?
The URL-safe alphabet replaces + and / with - and _. It is useful when Base64 appears in a URL.
Does decoding require padding?
No. You can decode either alphabet with or without padding. ASCII whitespace is ignored. The padding setting controls encoded output.
Are pasted line endings preserved?
The text field normalizes pasted CRLF and CR line endings to LF before encoding. When decoding, copying the result preserves its original line endings.
Why can some Base64 not decode to text?
Base64 can represent any bytes. This text tool accepts decoded bytes only when they form valid UTF-8.