About Base64 Encode & Decode
Use this Base64 encoder and decoder to convert text to Base64 and back. Text is first converted to UTF-8 bytes, so accents, Arabic letters, symbols and emoji encode correctly instead of failing, which is a common problem with the plain btoa function in JavaScript. The result appears instantly in the output box, ready to copy with one click.
Tick URL-safe Base64 when you need the variant that swaps + and / for - and _ and drops the = padding, as used in tokens and URLs. When decoding, both the standard and URL-safe alphabets are accepted and missing padding is added for you. Processing happens in your browser, so your text is never uploaded.
How to use Base64 Encode & Decode
- 01
Paste text or Base64.
- 02
Click Encode or Decode.
- 03
Copy the result.
When to use it
- Decoding a Base64 string from a config file, header or log to read what it contains.
- Encoding a username and password pair for a Basic authentication header while testing an API.
- Creating URL-safe Base64 strings for query parameters, filenames or token experiments.
- Checking that non-English text survives a round trip through Base64.
- Reading the encoded part of a data URI or a Kubernetes secret value.
Frequently asked questions
What is URL-safe Base64?
It is a variant that replaces + with - and / with _ and removes the = padding at the end. This keeps the string safe inside URLs, filenames and tokens such as JWT parts without extra percent-encoding.
Does it support Arabic and other Unicode text?
Yes. Text is converted to UTF-8 bytes before encoding and decoded back as UTF-8, so Arabic, accented letters and emoji are handled correctly. Decoding bytes that are not valid UTF-8 text shows an error.
Why do I get Not valid Base64 text when decoding?
The input contains characters outside the Base64 alphabet, is truncated, or decodes to bytes that are not readable UTF-8 text, for example a binary file. Check for stray quotes or missing characters.
Is Base64 encryption?
No. Base64 only changes how data is represented and anyone can reverse it. Never use it to hide passwords or secrets; use proper encryption for that purpose.
Does the decoder need padding or line breaks removed?
No. Whitespace and line breaks are ignored and missing = padding is added automatically, so you can paste wrapped Base64 directly. Both - and _ are accepted as well.
Is my text sent to a server?
No. Encoding and decoding run in your browser, with no upload and no usage limit. The tool is free and needs no account. It also works as a quick way to inspect Base64 pieces from other formats.