Base64 Converter
Base64 Converter
About the Base64 to Text Decoder
Base64 is an encoding that represents arbitrary binary data using only 64 safe text characters (A–Z, a–z, 0–9, + and /, with = as padding). Every 3 bytes of input become 4 characters of output, so Base64 text is about 33% larger than the original file — the price paid for being able to embed binary content in JSON, XML, email or HTML, which only carry text safely.
Plenty of everyday developer data is Base64-encoded text: HTTP Basic authentication headers, Kubernetes Secrets, environment variables in CI systems, email bodies, SAML messages and the individual parts of a JWT. This decoder turns the Base64 back into readable UTF-8 text and shows it on the page, and you can also save it as a .txt file.
Common uses
- Reading the values stored in a Kubernetes Secret (
kubectl get secret -o yamlshows them in Base64). - Decoding an
Authorization: Basic ...header to check which username a client sent. - Reading Base64-encoded email bodies or MIME parts.
- Inspecting encoded configuration values in CI/CD variables.
How to use it
- Paste the Base64 string into the input box.
- Select Text as the format and press Convert.
- The decoded text is shown immediately; copy it or click Save File to download it.
Example
A Basic authentication header decoded:
Authorization: Basic YWxpY2U6czNjcjN0
Paste: YWxpY2U6czNjcjN0
alice:s3cr3t
Tips and common pitfalls
- Text is decoded as UTF-8. If you see odd characters, the original was probably in a different encoding such as Windows-1252 or UTF-16.
- JWT segments use Base64URL, which swaps
+/for-_and drops padding. Use the JWT Decoder for tokens. - Padding (
=or==) at the end is part of the encoding; removing it can make strict decoders fail. - Decoded secrets are real secrets — do not paste production credentials into tools you do not control, and rotate any that you accidentally expose.
Frequently asked questions
Why do Kubernetes Secrets use Base64 if it is not secure?
Base64 lets Secrets hold arbitrary binary data such as certificates. Security comes from access control and encryption at rest in the cluster, not from the encoding.
How do I encode text to Base64?
In JavaScript use btoa() (for ASCII) or TextEncoder plus btoa for Unicode; on Linux/macOS use echo -n 'text' | base64; in C# use Convert.ToBase64String(Encoding.UTF8.GetBytes(text)).
Why does decoding fail with "not a valid Base-64 string"?
Usually because the input contains something other than pure Base64: a data:...;base64, prefix, surrounding quotes from a JSON value, or URL-safe characters (- and _ instead of + and /). Remove the prefix and quotes, and convert URL-safe characters back, then try again.
Is Base64 a form of encryption?
No. Base64 is an encoding, not encryption — anyone can decode it instantly and no key is involved. Never rely on Base64 to hide passwords, tokens or personal data.