Base64 Encoder / Decoder

Convert text to Base64 and back, or turn a file into a Base64 string. Accented characters, emoji, and other Unicode text are handled correctly, and nothing you paste leaves your browser.

Text

Files

Encode any file to Base64, or rebuild a file from a Base64 string you already have.

Large files take a moment and produce a string about a third longer than the file itself.

About this Base64 Encoder / Decoder

Base64 rewrites data using only 64 safe characters — the letters A to Z in both cases, the digits 0 to 9, and two symbols — so that binary content can travel through channels that only expect text. Paste text into the box and press Encode to Base64, or paste an encoded string and press Decode from Base64. The result appears underneath, ready to copy.

Unicode is handled properly, which is where many simple encoders fail. Text is first converted to UTF-8 bytes and only then encoded, so accented letters, non-Latin scripts, and emoji survive the round trip instead of throwing an error. On the way back, the bytes are decoded as UTF-8, and if the string turns out not to be readable text the tool tells you rather than showing scrambled characters.

The URL-safe option swaps the two symbols that cause trouble in web addresses, using a hyphen and an underscore in place of plus and slash, and drops the trailing padding. This is the variant used in JSON Web Tokens, in query strings, and in file names. Decoding accepts either variant automatically, along with any line breaks or stray spaces in the pasted string, and missing padding is restored for you.

The file section covers the binary side. Choose a file and it is read locally and turned into a Base64 string you can copy into a data URL, a configuration file, or an API request. Going the other way, put a Base64 string in the text box, give the file a name, and Decode Result to File rebuilds the original bytes and saves them. Because the work happens entirely in your browser, private documents and credentials are never uploaded.

Note: Base64 is an encoding, not encryption. It hides nothing — anyone can decode it in seconds — so never rely on it to protect passwords or personal data.

← Back to all tools