Use this free Base64 encoder and decoder to convert text to Base64 or turn a Base64 string back into readable text. Paste your text, choose Encode or Decode, and the result appears instantly. The tool handles UTF-8, so letters such as é and symbols such as € convert correctly, and it supports the URL-safe alphabet, optional padding, and line wrapping. You can copy the result, download it as a text file, or send it back to the input to convert it again. Everything runs in your browser and the result updates as you type.
Base64 is an encoding, not encryption. Anyone can decode it in seconds, so never use it to hide passwords or private data.
How to use the Base64 encoder and decoder
Paste your text and the converted version appears instantly.
- Paste your text: add plain text to encode, or a Base64 string to decode.
- Choose a mode: pick Encode to Base64 or Decode from Base64.
- Adjust the options (optional): choose the standard or URL-safe alphabet, keep or remove padding, wrap long output into lines, or process a list one line at a time.
- Copy or download: copy the result, download it as a .txt file, or use Use as input to convert the result again.
What each mode does
| Mode | Example | What it does |
|---|---|---|
| Encode to Base64 | Hello → SGVsbG8= | Converts your text to UTF-8 bytes and writes them using the 64-character Base64 alphabet. |
| Decode from Base64 | SGVsbG8= → Hello | Converts a Base64 string back to bytes and reads them as UTF-8 text. Spaces and line breaks are ignored. |
Base64 variants
| Variant | Characters | Typical use |
|---|---|---|
| Standard | A–Z a–z 0–9 + / = | General data, JSON, and most APIs. |
| URL-safe | A–Z a–z 0–9 - _ | URLs, file names, and tokens such as JWT, often without padding. |
| MIME | Standard, wrapped at 76 | Email attachments and older systems that limit line length. |
| PEM | Standard, wrapped at 64 | Certificates and keys stored as text. |
Common Base64 examples
| Text | Base64 | Note |
|---|---|---|
| Man | TWFu | Three bytes make four characters, so no padding is needed. |
| Hello | SGVsbG8= | Five bytes leave a short last group, so one = is added. |
| Hello, World! | SGVsbG8sIFdvcmxkIQ== | Thirteen bytes leave one byte over, so two = are added. |
| é | w6k= | Non-English letters are first converted to UTF-8 bytes. |
What this tool does and does not do
This tool converts text to Base64 and back using UTF-8. It does not encrypt, compress, or protect your data, and it does not check whether the content you decode is safe. Base64 makes data about one third larger, because every three bytes become four characters. This tool works with text only, so it cannot encode a file or an image directly. If you decode Base64 that represents an image or another file, the result will look like unreadable symbols, and the tool will tell you that the bytes are not valid text. A string that contains characters outside the Base64 alphabet cannot be decoded and will show an error.
Use Base64 to carry data through text-only systems, not to keep it secret. If something must stay private, use real encryption.
Worked examples
Encoding a message
Paste "Hello, World!" and choose Encode to Base64. The result is "SGVsbG8sIFdvcmxkIQ==", ready to paste into a JSON field, a config file, or an API request that expects Base64.
Decoding a Base64 string
Paste "SGVsbG8sIFdvcmxkIQ==" and choose Decode from Base64. The original text "Hello, World!" appears. If the string is split across several lines or has no padding, the tool still decodes it.
Making a URL-safe value
Choose Encode, then open the options and select the URL-safe alphabet and remove padding. Plus signs become hyphens, slashes become underscores, and the trailing equals signs are dropped, so the value can sit in a URL or a file name without extra encoding.
Common Base64 mistakes
- Treating Base64 as security. It hides nothing, because anyone can decode it. Use encryption for secrets.
- Mixing up the alphabets. Standard Base64 uses + and /, while URL-safe Base64 uses - and _. Many systems accept only one of them when encoding.
- Dropping or adding padding. Some strict decoders require the = signs and others reject them, so match what your system expects.
- Decoding binary data as text. Base64 from an image or a file does not form readable text, so the result looks garbled.
Frequently asked questions
What is Base64?
Base64 is a way of writing data using only 64 safe characters: the letters A to Z and a to z, the numbers 0 to 9, plus, and slash. It carries text or binary data through systems that only handle plain text, such as email and JSON.
Is Base64 encryption?
No. Base64 is an encoding, not encryption. Anyone can decode it without a key, so it should never be used to protect passwords or private data.
What does the = sign at the end mean?
The equals sign is padding. Base64 works in groups of three bytes, so one or two equals signs fill the last group when the data does not divide evenly.
What is URL-safe Base64?
URL-safe Base64 replaces the plus sign with a hyphen and the slash with an underscore, so the result can be used in URLs and file names without extra encoding. Padding is often removed as well.
Does it support non-English characters and emoji?
Yes. Text is converted to UTF-8 before encoding, so letters such as é, symbols such as €, and emoji all encode and decode correctly.
Why does my decoded text look garbled?
The Base64 may represent binary data such as an image or a file rather than UTF-8 text, or it may use a different text encoding. Bytes that are not valid text are shown as replacement characters, and the tool tells you when this happens.
Where does my text go?
The conversion runs in your browser. This page does not send or save the text you paste, and clearing the form removes it from the screen.
Is there a limit on text length?
The tool accepts up to 100,000 characters of text. For longer content, convert it one section at a time.