Base64 Encoder / Decoder
Convert standard UTF-8 text to Base64 and decode Base64 strings. Includes support for URL-safe Base64 and Unicode characters.
Your text 64 chars · 1 line
Result
How to use Base64 Encoder / Decoder
- Select Encode or Decode mode.
- Type or paste your text in the input area.
- Toggle URL-Safe format if needed for web parameters.
- Copy the result.
About Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text. Full Unicode is supported, so accented letters and emoji round-trip correctly, and a URL-safe option produces strings you can put in links and file names.
Related tools: JSON Formatter & Validator, URL Encoder / Decoder, JWT Decoder, Regex Tester
What Base64 is for
Base64 turns any data into plain letters, numbers, +, and / so it can travel through systems that only accept text, such as email bodies, JSON fields, HTTP headers, and data URLs. It makes data about a third larger.
Base64 is an encoding, not encryption. Anyone can decode it, so never use it to protect passwords or secrets.
Standard and URL-safe
Standard Base64 uses + and / and pads the end with =. Those characters have special meaning in URLs. URL-safe Base64 replaces them with - and _ and drops the padding, which is what JWTs and many APIs expect.
Text is converted to UTF-8 bytes before encoding, which matches how servers and most programming languages do it, so the output is interchangeable with other tools.
Common uses
- Basic auth headers
- Encode username:password for an Authorization: Basic header while testing an API.
- Decoding tokens and payloads
- Read the Base64 parts of webhooks, emails, or encoded config values.
- Data in URLs
- Create URL-safe strings for query parameters or file names.
- Debugging
- Check what an encoded field actually contains.
Questions about Base64 Encoder / Decoder
- Does this handle non-ASCII and Unicode characters?
- Yes. The converter utilizes UTF-8 byte encoding to preserve international characters, accents, and emojis.
- What is URL-safe Base64?
- URL-safe Base64 replaces + with - and / with _, and omits padding equal signs (=) for compatibility in query strings.
- Why do I get an error when decoding?
- The input contains characters that are not Base64, or part of it is missing. Both standard and URL-safe Base64 are accepted, and missing = padding is added automatically.
- Is Base64 secure?
- No. It is reversible by anyone. Use it to transport data, not to hide it.
- How do I switch between encoding and decoding quickly?
- Click Swap. The result becomes your input and the direction flips.
Comments
Questions, ideas, or a bug in Base64 Encoder / Decoder? Let us know.