Base64
A conversion page for identifying whether incoming token strings are standard Base64 or Base64url, with immediate decode and format-diff checks.
Runs in your browser. No input is sent to a server. Use this as a first-pass diagnostic step.
How to use
Paste text and click “→ Base64”. For reverse conversion, paste into Base64 and click “→ Text”. Enable URL-safe only when needed.
Notes (this tool)
- Mixing standard Base64 and Base64url often causes decode failures.
- Base64 is not encryption. Handle sensitive values carefully.
About this page
What does this tool do?
This page encodes UTF-8 text to Base64 and decodes Base64 back to UTF-8 text.
It also supports URL-safe (Base64url), useful for quick checks around JWTs and URL parameters.
For debugging, checking encoded output, decode validity, and padding in one place speeds up format mismatch analysis.
Beginner (1-minute quick start)
- Paste text, encode it, and confirm Base64 output
- Paste received Base64 and confirm decode success
- For JWT/URL use, try URL-safe mode
Practical operations
- Confirm standard Base64 vs Base64url differences before API integration
- Store source, encoded, and decoded values together during incident analysis
- Document whether padding is required or optional to prevent implementation drift
Operational troubleshooting
- Decode failure: check if URL-safe characters (- _) were treated as standard Base64
- Garbled text: verify UTF-8 assumptions on input/output
- Fails only at integration target: check padding (=) handling differences
Typical use cases
- Check whether JWT segments are valid Base64url
- Validate token-like strings used in APIs
- Isolate whether decode failures come from charset or format issues
Debugging workflow (recommended)
- Try decoding as standard Base64 first
- If it fails, retry with URL-safe enabled
- If it still fails, inspect charset (+ / / / = / - / _) and length
- For JSON/JWT, also verify surrounding format issues (quotes/splitting)
Recommendations (practical)
- Prefer Base64url for URL/cookie/token-embedded values
- Confirm whether your protocol requires padding
- Do not mix text and binary use-cases (this page is UTF-8 text oriented)
Common pitfalls
- Decoding Base64url as standard Base64 causes failures
- Padding (=) handling differs across implementations
- Base64 is not encryption and cannot protect secrets
- Double-encoding makes values hard to restore correctly
Security note
Base64 only changes representation; it does not provide confidentiality. Handle sensitive data with encryption, signing, and access control.
What this tool does
- UTF-8 text → Base64 (standard)
- Base64 (standard) → UTF-8 text
- Toggle URL-safe (Base64url)
- Shows an error for invalid Base64
Operational notes
- The same string can be interpreted differently by context. Prioritize destination specifications.
- Watch for upstream auto-conversion such as spaces, line breaks, and URL decoding.
Referenced specs
- RFC 4648 (Base64 / URL-safe)
- RFC 7515 Appendix C (Base64url without padding)
- WHATWG Encoding (UTF-8)
FAQ
What is URL-safe (Base64url)?
It replaces “+” and “/” with “-” and “_”, and typically omits trailing “=” padding (some contexts still require padding).
Can it convert files (binary)?
This page is for UTF-8 text. For binary files, use a dedicated file-based tool.
Why does decoding fail?
Common causes include invalid characters, incorrect padding, or treating Base64url as standard Base64 (or vice versa).
Is Base64 encryption?
No. Base64 is an encoding format, not encryption.
Can I use this for JWT decoding?
Yes for Base64url segment checks, but use JWT Verifier for signature validation.
References
Next to view (diagnostic order)
These links are generated from site_map rules in recommended diagnostic order.
- URL Encode/Decode — Convert URL encoding and decoding both ways
- JSON Formatter — Pretty-print, minify, and validate JSON
- JWT Decoder — Decode and pretty-print JWT header/payload
- Query String Parser — Parse query strings and list parameters
- UTM Builder — Build URLs with UTM parameters
- Text Counter — Count characters including newline and full/half-width views
Example
hello → aGVsbG8=
Base64url aGVsbG8= → aGVsbG8
Example
hello → aGVsbG8=