Base64 Encode: Convert Text to Base64 Online
Type or paste any text and get a clean Base64 string instantly. UTF-8 safe, with an optional URL-safe mode. Free, no signup.
Encode Text to Base64 in One Click
Need to drop text into a JSON field, an HTTP header or a data URL without it breaking? Base64 is the usual fix. Paste your text, click Encode, and this Base64 encoder hands you a string made only of safe characters, ready to copy.
Read more
What Is Base64 Encoding?
Base64 encoding takes raw bytes and rewrites them with 64 characters: A–Z, a–z, 0–9, + and /. Every 3 bytes become 4 characters, so the output is about a third longer than the input. In return, it survives email systems, URLs and text-only formats that would otherwise mangle the data. For example, Hello encodes to SGVsbG8=.
UTF-8 Safe for Every Language
Your text is converted to UTF-8 before it's encoded, so accents, non-Latin scripts and emoji come out right. That's where a lot of quick scripts trip up: JavaScript's built-in btoa() throws an error on characters it can't handle, like most emoji.
URL-Safe Base64 for Links and Tokens
Standard Base64 uses + and /, which mean something special inside a URL. Turn on URL-safe output to swap them for - and _ and drop the = padding. That's the format JSON Web Tokens and many APIs expect.
Encode a List Line by Line
Turn on Encode each line separately to process a whole list in one go: usernames, IDs or short strings. Each line gets its own Base64 value, in the same order you pasted them.
Encoding Images and Files
Want to embed a small icon in your CSS or HTML? Pictures need a file upload rather than a text box, so use our Image to Base64 converter. It gives you a ready-made data URI you can paste straight into your code.
When to Use Base64 (and When Not To)
Use it to move data through text-only channels: email attachments, Basic Auth headers, small inline images and API payloads. Don't use it to protect anything. Base64 isn't encryption, and anyone can reverse it with a Base64 decoder in a second.
How to Encode Text to Base64
Enter your text
Choose your options
Click Encode
Copy and use it
Base64 Encode FAQs
Everything about turning text into Base64.
How do I encode a string to Base64?
Why is my Base64 longer than the original text?
Why does my result end with = or ==?
Is Base64 encoding secure?
Can I encode an image to Base64 here?
Why does the same text give a different result on another site?
What is Base64 encoding used for?
How do I decode it back?
Encoded? Check that it decodes.
Paste your result into Base64 Decode to double-check it, or encode web addresses properly with URL Encode.
Base64 DecodeRaheel Jakhura
CEO / Co-Founder
Our goal is to provide online free tools so you don't have to install any software for basic usages. We are trying to add more tools and make these tools free forever.