About the Base64 Encoder / Decoder
Base64 turns any data into plain letters and numbers so it can travel safely in URLs, emails, JSON and HTTP headers. This tool converts in both directions and handles UTF-8 correctly, so Urdu, Arabic, Chinese or emoji text survives the round trip.
Base64 is a way of writing binary data with only 64 safe characters: A–Z, a–z, 0–9, plus and slash. It appears in data URLs, email attachments, HTTP Basic authentication headers, JSON Web Tokens and many API payloads that must carry bytes inside text. Developers use it daily, and so do support staff who need to read a value from a log.
This encoder and decoder handles text as UTF-8, so characters from Urdu, Arabic, Chinese or emoji survive the round trip, which naive btoa() calls in JavaScript get wrong. You can also encode a whole file, which is useful for building a data URL or embedding a small icon directly in CSS. A URL-safe option swaps + and / for - and _ and drops the = padding, the variant used in JWTs and in many URL parameters.
How to use the Base64 Encoder / Decoder
- 1Choose Encode or Decode.
- 2Type or paste your text.
- 3The result appears instantly. Click Copy to use it.
Key features
- Encode and decode text with proper UTF-8 handling.
- Encode any file into a Base64 string.
- URL-safe variant with - and _ and no padding.
- Accepts URL-safe input automatically when decoding.
- Instant results as you type.
Practical uses
- Reading the payload of an encoded value found in a log or a webhook.
- Creating a data: URL for a small image or font.
- Building an Authorization: Basic header from username:password for testing.
- Checking what a JWT segment contains.
Example
Encoding the text “Salam 👋” produces U2FsYW0g8J+Riw==. Decoding that string brings back the same text including the emoji, because the tool converts to UTF-8 bytes before encoding and back again after decoding.
Tips and common mistakes
- Base64 grows data by about a third, so avoid it for large files in JSON when a normal upload is possible.
- If decoding gives garbled characters, the original data may not be text at all, for example an image or a zip file.
- Whitespace and line breaks inside Base64 from emails are ignored by most decoders; remove them if decoding fails.
Limitations
- Decoded binary data such as images is shown as text, which will look like nonsense; the tool is meant for text output.
- Base64 offers no security: anyone can decode it.
Privacy
Encoding and decoding happen in your browser. Text and files you enter are not uploaded, so you can safely inspect values that contain credentials during debugging.
Frequently asked questions
Is Base64 encryption?
No. Base64 is only an encoding. Anyone can decode it, so never use it to hide passwords or secrets.
Does it support URL-safe Base64?
Yes. When decoding, the "-" and "_" characters used by URL-safe Base64 are accepted automatically.
Why is the encoded text longer?
Base64 uses 4 characters for every 3 bytes, so the output is about 33% larger than the input.
Why does my Base64 end with = or ==?
The equals signs are padding that makes the length a multiple of four. URL-safe Base64 often leaves them out.