Explore Ronda

Base64 encoder / decoder · free · no signup

Base64 encoder and decoder — both directions, Unicode-safe.

Encode text or a file to Base64, or decode Base64 back to text — with proper UTF-8 handling, an optional URL-safe alphabet, and a data-URL output for files.

Base64

What it does

About this free Base64 encoder / decoder.

Base64 is a way of representing binary data as printable ASCII text using 64 characters (A to Z, a to z, 0 to 9, plus and slash). This free Base64 encoder and decoder converts text to Base64 and back in your browser, encoding text as UTF-8 first so accented letters, emoji and other non-ASCII characters round-trip correctly. A URL-safe option swaps plus and slash for hyphen and underscore and drops the padding, which is the variant used in JWTs and query strings.

You can also pick a file and get either its raw Base64 or a ready-to-paste data URL for use in CSS, an img tag or an email template. Encoding runs on your machine with the browser’s built-in functions, so nothing you paste or select is uploaded.

Free · No signup · Runs in your browser · Last updated

  • Encode and decodeText to Base64 and Base64 to text, in one place.
  • UTF-8 correctHandles accented characters, emoji and any Unicode text without corruption.
  • URL-safe alphabetHyphen and underscore instead of plus and slash, with padding removed.
  • Files to data URLsPick an image or any file and get a data: URL with the right MIME type.
  • Copy in one clickOutput goes straight to the clipboard.
  • Nothing uploadedAll encoding uses the browser’s own functions.
How to use it

How to encode or decode Base64 in four steps.

Paste text or pick a file

Type into the Text box, or choose a file to convert it to a data URL.

Choose the alphabet

Tick URL-safe when the output is going into a URL, a JWT or a filename.

Encode or decode

Click Encode to produce Base64, or paste Base64 into the right-hand box and click Decode.

Copy the result

Use Copy to put the output on your clipboard, then paste it where it needs to go.

Good to know

Base64 questions, answered.

Why does my Base64 differ from another tool’s?

Usually Unicode: naive btoa() breaks on non-ASCII. This tool encodes text as UTF-8 first, which is what every sane API expects. The URL-safe option swaps + and / for - and _ and drops padding.

Can I encode a file?

Yes — pick a file and you get a data URL (ready to paste into CSS or an img tag), or the raw Base64 with URL-safe checked.

Is anything uploaded?

No. Encoding and decoding use the browser’s built-in functions.

What is Base64 used for?

Base64 is used wherever binary data must travel through a text-only channel: email attachments, data URLs embedded in HTML and CSS, the header and payload of a JWT, basic HTTP authentication, and binary fields inside JSON. It is an encoding, not encryption: anyone can decode it.

How much bigger does Base64 make my data?

About a third bigger. Every three bytes of input become four characters of output, plus up to two padding characters at the end. A 30 KB image becomes roughly 40 KB as a data URL, which is why inlining is best kept for small assets.

Why does decoded output look like garbage?

Usually the input was not text to begin with, or it was encoded with a different character set. Base64 of a PNG decodes to binary bytes, which are not readable. If the source was text in a legacy encoding such as Latin-1, decode it as UTF-8 and you will see replacement characters where the bytes do not line up.

From the people behind this

Building an API that returns files? Know the moment it stops returning them.

Uptime monitoring checks from 12 regions and confirms an outage from a second region before anyone is paged. $2 a monitor a month, your whole team included.