All tools

Base64 encoder / decoder

Base64 represents binary data as ASCII safe for JSON, HTTP headers, and email. Encode UTF-8 text or small files to Base64; decode API payloads and JWT segments back to readable text — all locally without leaking credentials to a server.
Input
Output
SGVsbG8gd29ybGQ=

How to encode or decode Base64

1. Choose encode or decode mode.
2. Paste input text or Base64 string.
3. Read output instantly.
4. Copy result to clipboard for config or debugging.

Base64 examples

Basic auth header

Encode "clientId:clientSecret" to Base64 for Authorization: Basic ... header (use HTTPS only).

Decode JWT payload segment

Middle part of eyJ... token decodes to JSON claims — pair with JWT decoder for full parse.

Embed small config

Encode ini snippet for environment variable transport.

When Base64 helps

When debugging API auth and data URIs.
When decoding error payloads from logs.
When teaching how encoding works interactively.

When Base64 is wrong tool

For encryption — Base64 is encoding not secrecy.
For large files — use proper binary transfer not giant Base64 strings.
When URL-safe variant needed — standard Base64 uses + and / (use URL encoder variant).

Not encryption

Anyone can decode Base64 — treat encoded secrets as exposed if intercepted. Always TLS in transit.

Size overhead

Encoded data is ~33% larger — acceptable for small tokens, wasteful for video.

JWT workflow

Decode header and payload segments separately; verify signature in app code — decoder tools do not validate crypto.

Frequently asked questions

URL-safe Base64?

Replaces +/ with -_ and may omit padding — check API spec.

Padding equals signs?

Valid Base64 ends with = or == for alignment — include when decoding strict parsers.

Decode failed?

Input may have whitespace or wrong alphabet — strip newlines.

Unicode text?

Encode UTF-8 bytes, not UTF-16 — standard for web.

Uploaded?

No.

Images?

Use image to Base64 for full data URL workflow.