Type or paste text and copy its Base64, written in the standard alphabet with +, / and =.
FluffyShieldProtected workspace
From
To
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
Does your Base64 need + and /, or - and _?
Base64 comes in two spellings that differ only in a few marks. This page writes the standard one, and a web address wants the other.
FluffyBench · 4 min read · Reviewed
What the encoder does
Store your text as UTF-8 bytes, the small numbers a computer keeps text in
→Write every three bytes as four characters
→Fill out a short last group with =
What it does
One line, however long
The Base64 is never broken into lines, so it pastes into a single-line field as it is.
Half an emoji is refused
An emoji is stored in two halves, and text cut between them keeps only one. The encoder stops with "The text has half of an emoji or other two-part character, which can't be saved as UTF-8. Delete it and try again." instead of encoding a broken character.
Limits It decodes only back to text. Bytes that are not text need the hex converter below.
When a form asks for a value in Base64
A settings screen, an app's instructions or a developer friend asks for a short message "in Base64". You type Lunch?🍕 and get back THVuY2g/8J+NlQ==. For most places that ask, that string is exactly right. For a web address it carries three kinds of mark that cause trouble.
Base64 writes with 64 characters: the 26 capitals, the 26 small letters, the ten digits and two more. RFC 4648, the standard that defines it, makes those last two + and /. Both already mean something inside a web address. A slash separates the parts of a path, and in the part after a question mark a + can be read as a space. So the same standard gives a second alphabet, often called base64url, with - in place of + and _ in place of /.
Two spellings
Only the marks are different. Every letter and digit stands where it stood, and both rows decode to the same 10 bytes. How we checked
Login tokens and other values carried in addresses usually leave the = signs off as well; the rules for JSON Web Tokens drop them by name. This page writes the standard spelling only.
Where the = signs at the end come from
Base64 works through the bytes three at a time and writes each group of three as four characters. Lunch?🍕 is 10 bytes: one for each of the six characters before the pizza, and four for the pizza, because UTF-8 needs that many for it.
That makes three full groups and one byte over. The encoder still writes four characters for that last byte and fills the two it has no data for with = signs. A last group of two bytes gets a single =, so a Base64 string ends in no =, one or two, and the count tells you how full its last group was.
Press Copy above the Base64 box. On a phone, that box is under Result.
If the value is going into a web address, change each + to -, each / to _, and drop the = signs.
Reading someone else's Base64
To decode, press the swap button so From is Base64 and To is Text. It reads both spellings: we gave it the URL-safe THVuY2g_8J-NlQ and it read Lunch?🍕 back, even with the = signs left off.
The Base64 holds a picture, a key or other bytes that aren't words