About Base64 Encoder & Decoder
Base64 is a way of writing binary data using only 64 printable characters: A to Z, a to z, 0 to 9, plus and slash. It is used wherever binary data has to travel through a system that only handles text, such as email attachments, data URLs in HTML and CSS, HTTP Basic authentication headers and parts of JSON Web Tokens.
This tool converts text to Base64 and back. It encodes the text as UTF-8 first, so accented letters, emoji and non-Latin scripts such as Gurmukhi or Devanagari round-trip correctly. Base64 is an encoding, not encryption: anyone can decode it, so never use it to hide passwords.
How to use Base64 Encoder & Decoder
- Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
- Paste your text or Base64 string into the input box and click Run Tool.
- Copy the result. If decoding fails, check for missing characters or extra spaces in the Base64 string.
Example
Input
Hello, NHP Learning!
Output
SGVsbG8sIE5IUCBMZWFybmluZyE=
Common uses
- Creating the Authorization header value for HTTP Basic authentication (username:password).
- Reading the contents of a data: URL or a Base64 value inside a config file.
- Checking what a Base64 string in an API response or an email source actually contains.
Privacy and safety
This tool runs in your browser. The text you enter is processed on your device and is not sent to NHP Learning.
Frequently asked questions
Is Base64 encryption?
No. It only changes how data is written. Anyone can decode it instantly, so it provides no secrecy.
Why does the encoded text end with = signs?
Base64 works in groups of three bytes. When the input does not fill the last group, one or two = characters are added as padding.
Why does decoding fail on a URL-safe Base64 string?
URL-safe Base64 uses - and _ instead of + and /. Replace them before decoding, or use the JWT Decoder for tokens, which handles that variant automatically.