Developer Tools

Base64 Encoder / Decoder

Encode text or files to Base64 and decode Base64 back, entirely in your browser.

Encode text or a file into Base64, or decode Base64 back into text or a downloadable file, entirely on your device. Working with percent-encoded URLs instead? Try the URL Encoder / Decoder.

Your text and files never leave your device. Encoding and decoding happen entirely in your browser.
Base64 is an encoding, not encryption: anyone can decode it. Text is converted to and from UTF-8.
What do you want to do?
0 characters
0 characters

How it works

Private Base64 encoding and decoding in your browser

1

Choose text or file

Type or paste text, or choose a file to turn into Base64. Nothing is uploaded.

2

Encode or decode

Pick Encode or Decode, and optionally URL-safe output, padding or line wrapping.

3

Copy or download

Copy the result, or download decoded data as a file with the name you choose.

Use cases

When this comes in handy

Embed a small image

Turn an icon into a data URI you can paste straight into CSS or HTML.

Inspect an encoded value

Decode a Base64 string from an API response, config file or email header to read it.

Prepare URL-safe tokens

Produce Base64URL output without + / or padding characters for use in links and tokens.

FAQ

Common questions

Is my text or file uploaded anywhere?

No. Encoding and decoding run entirely in your browser; nothing is sent to a server.

Is Base64 a form of encryption?

No. Base64 is only a way to write binary data as text. Anyone can decode it, so it does not protect secrets.

Does it handle Unicode and emoji?

Yes. Text is encoded as UTF-8 before it is converted to Base64, and decoded back as UTF-8. If decoded bytes are not valid UTF-8 text, you will see a message and can download them as a file instead.

What does URL-safe Base64 mean?

The URL-safe variant (Base64URL) uses - and _ instead of + and /, so the result can be used in URLs and filenames. When decoding, either alphabet is accepted, with or without padding.

Is there a file size limit?

File encoding is limited to 25 MB, because Base64 text is about a third larger than the original and must fit in your browser's memory.

Related Tools