Developer tool

Base64 Encode and Decode

Encode text as Base64 or decode Base64 back to readable text. Handles UTF-8, URL-safe Base64, missing padding and data: prefixes. Free, in your browser.

Your file never leaves your device.

Runs locally in your browser

Your text is not uploaded.

Simple steps

How it works

  1. 01

    Enter text or a Base64 value.

  2. 02

    Choose Encode or Decode.

  3. 03

    Copy the converted result.

How Base64 works, with an example

Base64 writes every 3 bytes as 4 characters from a 64-character alphabet (A to Z, a to z, 0 to 9, + and /), so the encoded text is about a third longer than the original. Text is first turned into UTF-8 bytes. Hello, World! is 13 bytes and becomes the 20 characters SGVsbG8sIFdvcmxkIQ==; the two = signs pad the last group, because 13 is not a multiple of 3.

Letters outside basic Latin take more bytes: café becomes Y2Fmw6k=, because é is two bytes in UTF-8, and the 👍 emoji, four bytes, becomes 8J+RjQ==.

Decoding what you paste

When decoding, the tool removes spaces, line breaks and a data: prefix, and accepts URL-safe Base64, which uses - and _ instead of + and /: SGk_ decodes to Hi?, just like SGk/. Missing = padding is fine as well, so SGVsbG8sIFdvcmxkIQ decodes to Hello, World!.

A character outside the Base64 alphabet, such as @, stops decoding with an error, and so do bytes that are not valid UTF-8 text, such as an encoded image. Base64 is an encoding, not encryption: anyone can decode it, so never use it to hide passwords or keys.

Good to know

Frequently asked questions

Does Base64 encrypt data?

No. Base64 is an encoding format, not encryption or access control.

Is Unicode text supported?

Yes. Text is encoded as UTF-8 before conversion.

What happens with malformed Base64?

The tool reports invalid encoding instead of returning a partial result.

Does the conversion use a server?

No. Encoding and decoding happen locally in your browser.

Can I encode files here?

This tool converts text only. Use Image to Base64 for image data URLs.

Can I paste URL-safe Base64 or a data URL?

Yes. URL-safe Base64 (with - and _ instead of + and /), missing = padding, line breaks and a data: prefix are all accepted.