Base64 Encoder/Decoder

Encode or decode Base64 strings

Runs in your browser

What is Base64?

Base64, defined in RFC 4648, writes any data with 64 ASCII characters (A–Z, a–z, 0–9, + and /) and uses = for padding. Every 3 bytes become 4 characters, so the output is about 33% longer than the input. This tool works in your browser: it converts your text to UTF-8 bytes before encoding, so accented letters, CJK and emoji survive the round trip, and it decodes Base64 back to readable text.

Use cases

  • Decode an HTTP Basic Authorization header to see which credentials a client sends, for example dXNlcjpwYXNz is user:pass
  • Encode a config value or a certificate as one line for a Kubernetes Secret or a CI environment variable
  • Turn SVG markup into a data:image/svg+xml;base64 URI for CSS or HTML
  • Read the Base64 body of an email (Content-Transfer-Encoding: base64) or a Base64 field in an API response

When to use?

Use it when a system only accepts plain text but you need to carry exact bytes, or when you meet a Base64 string and want to know what it says. Base64 is not encryption: anyone can decode it, so never use it to hide passwords or keys. To put text inside a URL, use URL Encoder instead, because +, / and = have their own meanings in URLs; this tool also handles typed or pasted text only, not file uploads.

Examples

  1. Encode a short text

    Input

    Hello, GetIt!

    Output

    SGVsbG8sIEdldEl0IQ==

  2. Decode a Base64 string

    Input

    R2V0SXQgVG9vbHM=

    Output

    GetIt Tools

Questions and answers

Is Base64 a form of encryption?

No. Base64 only changes how data is written, and anyone can decode it. Never use it to hide passwords or other secrets.

Why does decoding fail?

The input contains characters that are not part of the Base64 alphabet, or the padding at the end ("=") is incomplete. Copy the whole string and try again.

Can I encode accented letters, Asian scripts or emoji?

Yes. Text is converted to UTF-8 before it is encoded, so accented letters, Chinese, Arabic, Thai and emoji all work, and decoding gives back the original text.

Why does Base64 output end with = or ==?

Base64 encodes 3 bytes at a time. When the input length is not a multiple of 3, the last group is padded: one leftover byte gives ==, two leftover bytes give =. For example, Hi encodes to SGk=.

Can it decode URL-safe Base64 or a JWT?

Not directly. The tool uses the standard alphabet with + and /, while Base64url (RFC 4648, section 5), used in JWTs, uses - and _. Replace - with + and _ with / first; missing = padding at the end is accepted.

Sources and standards

All Tools