Skip to content
FreeToolsHub

Base64 Encoder/Decoder

Encode and decode Base64 text and files, UTF-8 safe.

Loading tool…

Everything is processed by JavaScript running in your browser tab. Your input is not sent to a server, logged or stored, so it is safe to use with configuration files and internal data. As always, avoid pasting production secrets into any website you do not control.

What is the Base64 Encoder/Decoder?

This tool converts text to Base64 and back with full UTF-8 support, so accented letters, non-Latin scripts and emoji round-trip correctly. A URL-safe option replaces + and / with - and _ for use in URLs and tokens.

You can also encode any file into Base64 or a data URI for embedding small images or fonts directly into HTML and CSS.

Why use it?

Base64 is used in email attachments, data URIs, HTTP Basic authentication headers and JSON Web Tokens. Developers often need to inspect or create Base64 values while debugging.

Many online encoders mishandle non-ASCII characters; this one encodes text as UTF-8 bytes first, which is what servers expect.

How to use the Base64 Encoder/Decoder

  1. Choose Encode or Decode.
  2. Type or paste your input; the result appears immediately.
  3. For encoding, tick URL-safe if the result will go into a URL or token.
  4. Copy the result, or download decoded binary data as a file.
  5. To encode a file, use the lower panel and copy either raw Base64 or a full data URI.

Examples

Decoding a JWT segment

The middle part of a JSON Web Token is URL-safe Base64. Paste it into Decode to read the JSON claims (the signature is not verified).

Inline SVG icon

Encode a small SVG file and paste the data URI into a CSS background-image to avoid an extra HTTP request.

Supported formats and inputs

  • Text input of any length that fits in memory.
  • Files up to 10 MB for encoding.
  • Standard and URL-safe alphabets; padding is optional when decoding.

Limitations to know about

  • Base64 is an encoding, not encryption. Anyone can decode it.
  • Encoded output is about 33% larger than the original data.

Privacy

Everything is processed by JavaScript running in your browser tab. Your input is not sent to a server, logged or stored, so it is safe to use with configuration files and internal data. As always, avoid pasting production secrets into any website you do not control.

Frequently asked questions

Is Base64 secure?

No. It only changes representation. Do not use it to protect passwords or secrets.

What is URL-safe Base64?

A variant that uses - and _ instead of + and / and often drops = padding, so the value can appear in URLs and file names without escaping.

Why does decoding show strange characters?

The data is probably binary (for example an image) rather than text. Use “Download as file” instead.

URL Encoder/Decoder

Percent-encode or decode URLs and query parameters.

Hash Generator

MD5, SHA-1, SHA-256, SHA-384 and SHA-512 for text or files.

HTML Entity Encoder/Decoder

Escape special characters as HTML entities and back.

JSON Formatter

Pretty-print or minify JSON with custom indentation.

Browse all developer tools →