Loona Automation logoLoona Developer Tools
Home › Developer Tools › Base64 Encoder & Decoder

Base64 Encoder & Decoder - Text and Files, UTF-8 Safe

In short: the Base64 Encoder converts text and files to Base64 and decodes Base64 back to text - correctly handling accents, Urdu, Chinese and emoji, with an optional URL-safe alphabet.

Base64 shows up everywhere: API payloads, email attachments, data URIs, basic-auth headers and JWT parts. The catch with many quick encoders is that they break on non-English text. This one encodes the UTF-8 bytes of your text, so anything you can type survives the round trip.

File to Base64

Choose a file to get its Base64 data string (useful for data URIs and test payloads). The file is read locally - it is never uploaded.

Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the Base64 Encoder & Decoder

  1. Type or paste your text (or pick a file for file-to-Base64).
  2. Optionally tick URL-safe if the result goes into a URL or a JWT.
  3. Click Encode or Decode and copy or download the result.

How it works

Base64 represents every 3 bytes of data as 4 characters from a 64-character alphabet, which makes binary data safe to carry inside text formats like JSON, XML and URLs. This tool first converts your text to its UTF-8 bytes (the universal encoding for text), then encodes those bytes - which is why accented letters, Arabic-script text and emoji all decode back perfectly. The URL-safe variant swaps + and / for - and _ and drops the = padding, exactly as used in JSON Web Tokens.

Worked example

The text "Loona" encodes to TG9vbmE=. The greeting "Assalam-o-Alaikum" with Urdu script and an emoji - السلام علیكم 👋 - encodes and decodes back letter-for-letter, which naive encoders that only handle plain ASCII cannot do.

Frequently Asked Questions

Is this Base64 tool free?

Yes - free, no sign-up, no limits.

Why do some Base64 tools garble non-English text?

They encode each character as a single byte, which only works for plain ASCII. This tool encodes the UTF-8 bytes instead, so every language and emoji round-trips exactly.

What is the URL-safe option?

Standard Base64 can contain + and /, which are special characters in URLs. The URL-safe alphabet replaces them with - and _ and removes padding - the variant used in JWTs.

Is Base64 encryption?

No. Base64 is an encoding, not encryption - anyone can decode it instantly. Never use it to protect secrets.

Are my files uploaded?

No. Files are read by your browser on your device and never leave it.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.