Base64 Encode / Decode

Convert to and from Base64.

Updated
Loading tool…

Convert to and from Base64.

How to use Base64 Encode / Decode

  1. Switch between encode and decode mode
  2. Paste or type your text or Base64 string
  3. Copy the converted result with one click
Want the how & why?Read: What Is Base64 Encoding? (And What It Is Not) →
Try next →Cron GeneratorBuild cron expressions.

About Base64 Encode / Decode

Base64 Encode/Decode is a free online tool that converts plain text into a Base64 string and decodes any Base64 string back to its original text. Pick encode or decode mode, paste or type your input, and the result updates live with a one-click copy button. It handles full UTF-8, so accented letters, symbols, and emoji round-trip correctly instead of turning into garbled characters.

Decoding a string is the most common reason people come here, and the tool tells you when something is off: an "invalid Base64" error usually means the input has stray characters or missing padding. Spaces and line breaks are ignored, so you can paste wrapped data straight from an email header, a JSON payload, a config file, or a data URL without cleaning it up first. If you normally reach for atob and btoa in JavaScript, base64.b64decode in Python, base64 -d on Linux, or a Convert.FromBase64String one-liner in PowerShell, this does the same conversion without opening a terminal or writing any code.

Everything runs entirely in your browser. Your text is never uploaded to a server, so it stays private and works even when you are offline, with no limits, no sign-up, and no software to install.

Frequently asked questions

How do I decode a Base64 string to plain text?
Switch to decode mode, paste your Base64 string into the input box, and the original text appears instantly in the output. Use the copy button to grab the result, then re-encode it any time by switching back to encode mode.
Does it also encode text to Base64?
Yes. In encode mode, type or paste any text and it is converted to a Base64 string as you go. It is fully reversible, so you can encode something and decode it back later without losing anything.
Can I decode a Base64 image with this tool?
This tool decodes Base64 to text, so it is best for text, tokens, and data strings rather than viewing pictures. If you have an image data URL like data:image/png;base64,..., paste the full string into a browser address bar or an <img> src to actually render it; pasting only the raw part here will decode the underlying bytes but will not display them as an image.
How do I decode Base64 in JavaScript?
Use atob() to decode a Base64 string and btoa() to encode one. Because those work on Latin-1, wrap them with TextDecoder/TextEncoder (or decodeURIComponent(escape(...))) to handle emoji and accented characters correctly. Pasting your string here does the same UTF-8-safe conversion without any code.
How do I decode Base64 in Python?
Import the base64 module and call base64.b64decode("your string"), then .decode("utf-8") to turn the bytes back into text. To go the other way, use base64.b64encode(text.encode("utf-8")). This tool is a quick alternative when you just want the result without running a script.
How do I decode Base64 on Linux from the command line?
Pipe the string into the base64 command with the decode flag, for example: echo "SGVsbG8=" | base64 --decode (or base64 -d). To decode a whole file, run base64 -d file.txt. Paste the string here if you would rather not open a terminal.
How do I decode Base64 in PowerShell?
Use [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String("SGVsbG8=")) to decode, and [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("text")) to encode. Watching for encoding mismatches is the usual gotcha, which this tool handles automatically.
Why am I getting an invalid Base64 error?
Decoding fails if the input contains characters that are not valid Base64 or has incorrect padding (the trailing = signs). The tool ignores spaces and line breaks, so double-check for missing, extra, or truncated characters in what you pasted.
Does it support emoji and non-English characters?
Yes. The tool uses proper UTF-8 handling, so accented letters, emoji, and other Unicode characters encode and decode correctly instead of coming out as broken symbols.
What is Base64 used for?
Base64 encodes binary or text data into a plain ASCII string, which is handy for embedding data in URLs, JSON, HTML, email headers, JWTs, and config files that expect text. Decoding reverses it to read the original content.
Is my data uploaded to a server?
No. All encoding and decoding happens locally in your browser, so your text never leaves your device and works even offline.
Is this Base64 tool free?
Yes, it is completely free to use with no sign-up, no limits, and no software to install.