Base64 Encode and Decode

Encode text to Base64 and decode Base64 back to text in your browser. Includes a URL-safe variant and a file-to-Base64 mode. Free, no signup, nothing uploaded.

Text to encode
Base64 output

How to encode and decode Base64

1

Pick Encode or Decode

Choose Encode to turn text into Base64, or Decode to turn Base64 back into text. The output updates as you type.

2

Paste Your Text

Type or paste into the left box. Turn on URL-safe if the result needs to go in a URL or a filename.

3

Copy the Result

Copy the output, or use Swap to send it back to the input and flip the direction in one click.

Pixellize free online tools illustration showing browser, file, and gear icons

What Base64 Is and When You Need It

Base64 is a way to write any data, text, images, or files, using only 64 plain characters that survive being passed through systems built for text. It is not encryption and it hides nothing, it just repackages bytes into a form that email, URLs, JSON, and config files can carry without choking on special characters.

You run into it constantly: data URIs that embed an image straight into HTML or CSS, tokens and basic auth headers, encoded values in API payloads, and email attachments. Decoding it turns that wall of characters back into the original text so you can read what is actually there.

This tool does both directions in the browser. Encode text or a whole file, switch to the URL-safe alphabet when the result has to live in a link, and decode any Base64 string back to readable text. Because it runs locally, you can paste sensitive values without them leaving your device.

Why Use Our Base64 Tool?

Encode and Decode

Convert text to Base64 and back again, both directions in one tool with live output.

UTF-8 Safe

Handles accents, emoji, and non-Latin scripts correctly, so nothing gets mangled in the round trip.

URL-Safe Variant

Switch to the URL-safe alphabet that uses dashes and underscores with no padding, for URLs and filenames.

File to Base64

Drop in any file to get its Base64 string or a ready-to-use data URI for embedding.

One-Click Swap

Send the output back to the input and flip encode to decode without retyping anything.

Runs Locally

Everything happens in your browser. Your text and files are never uploaded or stored.

Frequently Asked Questions

Common questions about Base64 encoding and decoding.

What is Base64 encoding?
Base64 turns binary or text data into a string of 64 safe characters. It lets data that might contain special bytes travel through text-only channels like URLs, email, and JSON without being corrupted.
Is Base64 the same as encryption?
No. Base64 is just an encoding, not encryption. Anyone can decode it back to the original, so never use it to hide passwords or secrets. It only makes data safe to transport, not private.
What is URL-safe Base64?
Standard Base64 uses the characters plus and slash, which have special meaning in URLs. URL-safe Base64 swaps them for dash and underscore and drops the padding, so the result is safe to drop into a link or a filename.
Does this handle emoji and accents?
Yes. The tool encodes and decodes as UTF-8, so emoji, accented letters, and non-Latin scripts round-trip correctly instead of turning into broken characters.
Can I encode a file to Base64?
Yes. Switch to the File to Base64 tab and drop in any file. You get the raw Base64 or a complete data URI you can paste into HTML or CSS.
Is this Base64 tool free?
Yes, it is completely free with no signup and no limits. Everything runs in your browser, so your text and files stay on your device.
Scroll to Top