Base64 Encoder
Encode and decode Base64 strings.
Convert text to Base64 and back
Base64 Encoder turns text into a string made only of letters, digits and a couple of symbols, so it can travel safely through systems that expect plain ASCII — HTTP headers, JSON fields, data attributes or email. Decode mode reverses it and shows the original text.
Text is converted to UTF-8 bytes before encoding, so accents, emoji and non-Latin scripts survive the round trip. Conversion happens in your browser as you type; nothing is sent to a server.
How to encode or decode Base64
- Choose Encode or Decode at the top.
- Type or paste into the input box. The result appears immediately underneath.
- When encoding, tick “URL-safe output” if the value is going into a URL, file name or token.
- Click Copy output to take the result.
- To check your work, click “Use output as input”: the result moves to the input and the mode flips, so you should get your original back.
What the output looks like
- Standard Base64 uses A–Z, a–z, 0–9, + and /, and may end in one or two = padding characters.
- URL-safe Base64 swaps + for - and / for _, and drops the = padding, so nothing needs escaping in a link.
- Longer than the input: every 3 bytes become 4 characters, so encoded text is about a third larger.
Common reasons to use Base64
- Basic auth headers: encode “username:password” for an Authorization header while testing an API.
- Reading tokens: decode the middle section of a JWT to see its claims (it’s URL-safe Base64), then lay out the JSON with the JSON Formatter.
- Config and secrets files: check what a Base64 value in a Kubernetes secret or .env file actually contains.
- Embedding text: store text containing quotes or line breaks in a field that only accepts simple characters.
What Base64 does and doesn’t do
Encoding is not encryption
Base64 has no key and no secret. Anyone who sees an encoded string can decode it in seconds, so it gives no protection to passwords or personal data. Use it to make data safe to transport, not to hide it.
Why some strings won’t decode to text
Base64 can hold any bytes, including images, PDFs or compressed data. If the decoded bytes aren’t valid UTF-8 text, the tool tells you it has found binary data rather than showing garbled characters. This tool works with text only; it doesn’t read or save files.
Base64 Encoder: common questions
Can I decode URL-safe Base64 or strings without padding?
Yes. Decode mode accepts both the standard and URL-safe alphabets, with or without = padding, and ignores spaces and line breaks, which is handy for wrapped email or PEM text.
Why do I get “This isn’t valid Base64”?
The input contains a character outside A–Z, a–z, 0–9, +, /, - and _, or its length can’t be a Base64 value. A common cause is pasting a whole data URI — remove the “data:…;base64,” prefix first.
Why is my encoded text different from another tool’s?
Check whether one side uses URL-safe output or strips padding. Also make sure both encode the same text — a trailing space or line break changes the result.
Is Base64 safe for storing passwords?
No. Base64 is an encoding, not encryption: anyone can decode it in one step, so it hides nothing. Passwords should be stored with a dedicated password-hashing function, which this tool doesn’t provide.

