BrowserTools

Base64 Encoder / Decoder

UTF-8-safe Base64 encode and decode

By Guga — BrowserTools maintainer, Tbilisi, Georgia Updated 2026-09-05
Free Private No uploads
What is Base64 Encoder / Decoder?

Base64 is an encoding, not encryption, and the distinction is not pedantry: there is no key, so anyone who can see the string can read it in one step. What Base64 does is make binary data safe to carry through systems that only handle text. Text is first encoded as UTF-8 bytes, then those bytes are written in groups of three as four characters drawn from a 64-character alphabet, which is why the output runs about a third longer than the input. Both directions are available from a single tab switch, and the decoding side is forgiving: whitespace and line breaks are stripped, and the URL-safe substitutes for plus and slash are converted back so a token lifted from a URL or a JWT decodes cleanly. Text beyond the basic multilingual plane costs more than one Base64 character per letter.

Encode text to Base64 or decode Base64 back to text, with full UTF-8 support (emoji and non-Latin scripts included). The decoder also accepts URL-safe Base64 (with - and _ characters) and ignores whitespace and line breaks.

Private Base64 Encoder / Decoder In Your Browser

Base64 Encoder / Decoder is processed locally with client-side JavaScript. Your files never touch a server, and there is no queue to wait in.

Step-by-Step

How to use Base64 Encoder / Decoder

1

Choose the Encode tab, then paste plain text into the box marked Plain input.

2

Read the Encoded result below and copy it straight into your code, header or markup.

3

Switch to the Decode tab when you have a Base64 string to read, and paste it into Encoded input.

4

Check the Decoded result for stray characters such as a trailing newline that a sender may have added.

Key Capabilities
  • UTF-8 throughout, so emoji, accents and Cyrillic or CJK text round-trip correctly
  • Decoding tolerates whitespace, line breaks and the URL-safe - and _ characters
  • Single tab switch between encoding and decoding, both updating as you type
  • Encoding output expands by the standard one-third, padding with = where needed
Common Use Cases
  • A developer putting a small UTF-8 JSON payload into an HTTP header, where raw non-ASCII bytes are not permitted.
  • A support engineer decoding the Base64 blob inside a data URI to see what an email template actually contains.
  • A student checking what a sentence looks like once every character has been swapped for a safe alphabet.
Clear Answers

Frequently Asked Questions

Is Base64 a way of hiding a password or a secret?
No. Encoding has no key, so it is reversible by design — there are single-line routines that turn any Base64 string back into its original bytes. Treat it as a transport format, nothing more. Anything that must stay secret has to be encrypted with a key, or hashed so it cannot be recovered at all.
Why is my encoded string longer than the text I put in?
Base64 turns every three bytes into four characters, so the output is about 33% longer. Where the final group is short it is padded with equals signs: one byte becomes two characters plus two equals, two bytes become three characters plus one. That padding is part of the format rather than an artefact of this tool.
How many characters does an emoji cost?
Four bytes of UTF-8, which becomes eight Base64 characters. A letter in the Latin alphabet is one byte and costs two characters, while a character outside the basic multilingual plane — most emoji, many CJK ideographs, historic scripts — costs its full byte length. Compare lengths in characters and you will badly misjudge the size of non-Latin text.
Can it handle a string that uses - and _ instead of + and /?
Yes. That is the URL-safe variant used in JWTs, query parameters and filenames, and the decoder maps those two characters back before processing. Whitespace and line breaks are ignored too, so a Base64 value wrapped across several lines by an email client still decodes.

Related Guides

View all guides →