Browser-based developer tools

Base64 Encoder and Decoder

Encode and decode UTF-8 text as Base64 without sending input to a backend.

Input

0 bytes

Result

Ready

JWT DecoderInspect token claims URL EncoderEscape query strings Hash GeneratorSHA digests for text

Reference notes

Base64 for payloads and tokens

UTF-8 aware

The encoder handles regular Unicode text by converting strings through UTF-8 bytes before Base64 output.

API friendly

Base64 appears in tokens, request payloads, basic auth headers and compact transport formats.

Not encryption

Base64 is reversible encoding. Do not treat encoded values as secret or protected data.

Diagnose Base64 payloads without losing text

Base64 validity and UTF-8 validity are different checks. Decode first converts the Base64 alphabet to bytes, then checks whether those bytes form UTF-8 text. A binary attachment can pass the first step and fail the second. This is a text codec, not a binary file viewer or charset detector.

The decoder uses TextDecoder's fatal mode to reject malformed sequences. A leading UTF-8 byte order mark is preserved as U+FEFF rather than silently stripped. Error messages are kept outside the result, and editing input clears old output and metrics before another operation.

Copy these inputs and choose Decode

Base64 inputExpected resultDiagnostic purpose
aGVsbG8=helloBasic text round trip.
w6k=éMulti-byte UTF-8 character.
8J+YgA==U+1F600 emojiFour-byte UTF-8 sequence.
/w==Invalid UTF-8 errorValid Base64 containing byte FF.
ww==Invalid UTF-8 errorTruncated multi-byte sequence.
%%%Invalid Base64 errorCharacters outside the standard alphabet.

API debugging workflow

  1. Check the producer's contract: ordinary Base64, Base64url, or a complete data URL are different inputs. Use the JWT decoder for token segments; this tool does not translate the Base64url alphabet.
  2. Use a synthetic sample first. Do not share real authentication headers or secret payloads in bug reports.
  3. Remove a data URL prefix only when you know the remaining content is UTF-8 text. Images, compressed bytes and other binary content need a binary-aware viewer.
  4. Whitespace around or within Base64 is ignored. Missing final padding is accepted when the browser's Base64 decoder can infer it; arbitrary truncation is not repaired.
  5. If decoding succeeds, inspect the content in the JSON workspace when appropriate. Base64 decoding alone does not validate JSON or establish trust.

For URL transport, check whether a plus sign was converted into a space by form encoding. Do not blindly replace spaces with plus signs; compare the original request using the URL codec. Empty text is a valid empty result. Very large payloads can still block the tab; use a local streaming utility for files.

Frequently asked

Base64 encoding questions

Is Base64 the same as encryption?

No. Base64 is a reversible text encoding, not encryption. Anyone can decode a Base64 string back to its original value with no key or password required. Do not use it to protect sensitive data.

Why are decoded bytes rejected as invalid UTF-8?

Base64 can represent arbitrary bytes, including binary files and text encoded with other character sets. This text decoder rejects bytes that are not valid UTF-8 instead of replacing them. Confirm the producer's encoding; do not assume a valid Base64 string must contain readable text.

Where is Base64 commonly used?

Base64 shows up in JWT tokens, HTTP Basic authentication headers, embedding small images directly in CSS or HTML with data URIs, and encoding binary attachments inside JSON or XML payloads.

Does this tool handle large files?

This tool is built for text and short strings processed entirely in your browser. Very large files may slow down the tab since no data is streamed to a server for processing.