.txt · text/plain

Base64: Base64 & Base64URL Text Encoding

Base64 (RFC 4648) encodes arbitrary UTF-8 or binary bytes using 64 ASCII characters (`A-Z`, `a-z`, `0-9`, `+`, `/` or `-`, `_` for URL-safe JWTs).

Quick Answer: Base64 (RFC 4648) encodes arbitrary UTF-8 or binary bytes using 64 ASCII characters (`A-Z`, `a-z`, `0-9`, `+`, `/` or `-`, `_` for URL-safe JWTs). JWT token inspection, HTTP Basic Auth headers, Kubernetes Secret manifests, and URL-safe binary tokens.

Structure typePlain Text
Human readabilityLow
Nesting supportNo
LLM token efficiencyLow
File extension.txt
MIME typetext/plain
Best forJWT token inspection, HTTP Basic Auth headers, Kubernetes Secret manifests, and URL-safe binary tokens.

Strengths

  • Transports arbitrary UTF-8 and binary data safely across ASCII-only channels
  • Powers JWT headers/payloads (Base64URL) and Kubernetes Secret values
  • Decodes and inspects JWT claims safely in browser memory without leaking tokens

Trade-offs

  • Expands byte size by ~33% and destroys human readability
  • Naive browser atob()/btoa() crashes on Unicode/CJK unless UTF-8 TextEncoder is used
  • Base64 is encoding, not encryption—never treat Base64 strings as secure secrets

References

Convert & clean Base64 locally

Related engineering guides

Related Formats

All 24 formats

Base64 frequently asked questions

Why does browser atob/btoa throw errors on emoji or Chinese text?

Legacy window.btoa only accepts Latin-1 bytes. TxtTo encodes/decodes via UTF-8 TextEncoder and TextDecoder so Unicode and CJK text always round-trips safely.

What is URL-safe Base64 (Base64URL) used in JWTs?

Base64URL replaces + with -, / with _, and omits trailing = padding so tokens sit safely inside URLs and HTTP Authorization headers.

Is it safe to paste production JWTs into TxtTo's decoder?

Yes. All Base64 and JWT header/payload decoding runs offline in local browser memory with zero network requests.