PixConvert

Free Online Base64 Encoder & Decoder

Convert plain text, images, and binary files to Base64 format or decode Base64 strings. Client-side processing with zero server transmission.

How to Encode or Decode Base64

1

Pick Encode or Decode.

Choose the tab you need, then type or paste your text. On the Encode tab you can also click Encode a file to load any file.

2

Run it.

Click Encode or Decode, or press Ctrl+Enter (Cmd+Enter on a Mac). The result appears in the output box, and an error shows above it if the input can't be read.

3

Copy or reverse it.

Click Copy Output to put the result on your clipboard, or click Swap to move it into the input and run the opposite mode.

Frequently Asked Questions

Answers about Base64 encoding, decoding, files, padding and URL-safe strings.

What is Base64 encoding used for?

Base64 turns binary data into text using 64 characters (A to Z, a to z, 0 to 9, + and /), so it can travel through email, JSON, HTML and HTTP headers that expect text. Common uses are data URIs, email parts, Basic Auth headers and API payloads.

How do I decode a Base64 string?

Open the Decode tab, paste the string and click Decode or press Ctrl+Enter. The text appears in the output box. Line breaks, spaces and missing = padding are fine, but the result has to be UTF-8 text; binary data shows an error.

Is Base64 encoding secure?

No. Base64 is an encoding, not encryption, so anyone can decode it without a key. Don't use it to hide passwords or secrets. To protect data, encrypt it; to get a fingerprint of a file or text, use a hash generator instead.

How do I convert a file to Base64?

On the Encode tab, click Encode a file and pick any file, such as a PNG, PDF or font. The output box shows the raw Base64 without a data: prefix. Copy it from there, and don't click Encode again, which would encode the Base64 itself a second time.

Can I convert Base64 to an image here?

Not yet. The decoder only outputs text, so Base64 of an image, PDF or ZIP shows an error instead of a download. To view an image, put data:image/png;base64, in front of the string and paste the whole thing into your browser's address bar.

What is the difference between Base64 and Base64URL?

Base64URL swaps + for - and / for _ and often drops the = padding, so the string is safe in links and file names. This tool reads and writes standard Base64 only. For JWT parts, which use Base64URL, the JWT decoder converts them for you.

How do I remove padding from a Base64 string?

The = signs at the end are padding that brings the length up to a multiple of 4. This tool always adds them when encoding, so delete them by hand if your system wants unpadded Base64. When decoding, missing padding is accepted.

Why does decoding show an error?

Decoding fails when the string has characters outside the standard alphabet, such as - or _, starts with a data:...;base64, prefix, or holds bytes that aren't UTF-8 text, like an image or an old Latin-1 file. Delete the prefix, or change - to + and _ to /.

Does Base64 make a file bigger?

Yes, by about a third. Every 3 bytes become 4 characters, so a 3,000-byte file gives 4,000 characters of Base64. That is why data URIs suit small icons and fonts better than large photos, which load faster as normal files.

Does it handle emoji and accented letters?

Yes. Text is turned into UTF-8 bytes before encoding, so é, 世界 and 😀 encode and decode back unchanged. The one exception is a broken emoji, half of a surrogate pair left over from bad copying, which can't be encoded and shows an error.

Is it safe to encode passwords or private files here?

Your text and files are read in this browser tab and never sent to PixConvert. On the live site, analytics record clicks like Copy, the time a run took and a size range such as 0-100KB, never what you paste. Base64 still hides nothing, so treat the output like the original.

What the Base64 Encoder and Decoder Does

Encode UTF-8 text or any file to standard Base64, decode Base64 strings back to text, and copy the result with one click.

Base64 encoder with Zoë 世界 and an emoji as input and the UTF-8 Base64 output Wm/DqyDkuJbnlYwg8J+YgA==

Encode and Decode Base64 Text in UTF-8

Type or paste text and click Encode to get standard Base64 with + and / and = padding. Decode turns a Base64 string back into text, and accents, CJK and emoji survive the round trip.

  • UTF-8 for accents, CJK and emoji
  • Standard alphabet with + / and = padding
  • Decode accepts missing padding and line breaks
Try now
Base64 file encoder: a 1 KB icon.png turned into a long Base64 string, with PDF and WOFF2 files shown as other inputs

Convert Any File to Base64

Click Encode a file and pick an image, PDF, font or any other file. It is read on your device, and the output box shows its Base64, ready to copy.

  • Any file type, one file at a time
  • Raw Base64 output, no data: prefix
  • Output is about 4/3 the file size
Try now

Swap to Reverse a Result

Swap moves the output into the input, flips between Encode and Decode and runs it again, so you can check that a string decodes back to the original.

Decodes Wrapped and Unpadded Strings

Decode ignores line breaks and spaces, so Base64 copied from raw email source or a log file works as it is. Strings with the trailing = padding missing decode too.

Run It From the Keyboard

Press Ctrl+Enter, or Cmd+Enter on a Mac, in the input box to encode or decode without the mouse. Copy Output then puts the result on your clipboard.

Private and Free to Use

No account or limit. Your text and files stay in this tab. Analytics record clicks like Copy, the time a run took and a size range, never what you paste.

Common Base64 Use Cases

Base64 is everywhere in web development. Here's where you'll use this tool.

API Authentication

Build the value for an HTTP Basic Auth header by encoding username:password, or decode the part after the word Basic in a header copied from a request to see which account it uses.

  • Encode user:pass for an Authorization: Basic header
  • Decode the part after Basic from a copied header
  • Use the JWT decoder for tokens with - and _ characters

Inline Assets

Turn a small icon, image or font into Base64 to embed in HTML, CSS or JSON. Add the data: prefix yourself, for example data:image/png;base64, before the output.

  • Embed small PNG or SVG icons as data URIs
  • Inline a WOFF2 font in a CSS @font-face rule
  • Send a small file inside a JSON field as text

Email & Data Transfer

Decode a Base64 text part from raw email source to read it, or encode text for a system that only accepts plain ASCII. Line breaks in the source are ignored on decode.

  • Decode Base64 text parts from raw email source
  • Encode UTF-8 text for ASCII-only fields and configs
  • Decode values from a Kubernetes Secret manifest