Base64 Encoder & Decoder — Free Online, UTF-8 Safe

Encode and decode Base64 online free. Full UTF-8 / Unicode support, instant conversion both ways. No signup, runs in your browser. 100% free, private,.

How to use

  1. Choose Mode — Select Encode to convert text to Base64, or Decode to convert Base64 back to text
  2. Enter Input — Paste your text or Base64 string into the input area
  3. Convert & Copy — Click the button to process, then copy the result

What Is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters. It was designed to safely transmit binary data through systems that only support text — such as email (MIME), JSON payloads, HTML data URIs, and URL parameters.

The encoding uses uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), plus (+), and slash (/), with equals (=) for padding. This 64-character alphabet is universally safe across all text-based protocols.

How Base64 Works

Base64 takes 3 bytes (24 bits) of input and splits them into 4 groups of 6 bits each. Each 6-bit group maps to one of the 64 characters in the Base64 alphabet. If the input length is not divisible by 3, padding characters (=) are added to make the output length a multiple of 4.

For example, the text "Hi" (2 bytes) becomes "SGk=" in Base64. The single padding character indicates one byte of padding was needed.

Common Use Cases

  • Data URIs: Embed images directly in HTML/CSS using data:image/png;base64,...
  • API payloads: Send binary data (files, images) in JSON request bodies
  • Email attachments: MIME encoding uses Base64 for file attachments
  • Authentication: HTTP Basic Auth encodes credentials in Base64
  • JWT tokens: JSON Web Tokens use Base64url encoding for header and payload

Base64 vs Base64url

Standard Base64 uses + and / which are not URL-safe. Base64url replaces these with - and _ and omits padding. JWT tokens use Base64url. This tool uses standard Base64. For JWT decoding, use our dedicated JWT Decoder.

UTF-8 Support

This tool properly handles UTF-8 text including accented characters (é, ñ), CJK characters, emoji, and other Unicode content. It uses the TextEncoder API to convert strings to UTF-8 bytes before encoding, and TextDecoder to restore them after decoding.

Size Considerations

Base64 encoding increases data size by approximately 33%. Three bytes of input produce four characters of output. This overhead is the trade-off for text-safe transmission. For large files, consider binary transport instead of Base64 encoding.

Privacy

All encoding and decoding happens locally in your browser using JavaScript's built-in btoa() and atob() functions with TextEncoder for UTF-8 support. No data is transmitted to any server.

Encode URLs for safe transmission with our URL Encoder/Decoder. Decode JWT tokens with our JWT Decoder.

Frequently asked questions

What is Base64 encoding?

Base64 converts binary data into a text format using 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). This allows binary data to be safely transmitted through text-based protocols like email, JSON, and URLs.

Does Base64 encrypt data?

No. Base64 is an encoding, not encryption. Anyone can decode Base64 back to the original data. It provides no security or confidentiality.

Why does Base64 make data larger?

Base64 uses 4 characters to represent every 3 bytes of data, resulting in approximately 33% size increase. This is the trade-off for text-safe encoding.

Does this handle Unicode/UTF-8?

Yes. This tool uses TextEncoder/TextDecoder to properly handle UTF-8 characters including emoji, accented characters, and non-Latin scripts.

Is my data safe?

Yes. All encoding and decoding happens in your browser. No data is sent to any server.

Related free tools

  • XML Formatter & Minifier — Beautify or minify any XML — SOAP, RSS, SVG, sitemap. Browser-based parser.
  • XML to JSON Converter — Parse any well-formed XML into a clean JSON tree with attributes and arrays.
  • JSON to XML Converter — Convert JSON to well-formed XML — supports attributes, custom root, declaration.
  • CSV Viewer — Open CSV or TSV files in your browser — sort, search, paginate, export filtered view.
  • JSON to CSV Converter — Convert JSON data to CSV format. Export to spreadsheets easily.
  • CSV to JSON Converter — Convert CSV data to JSON format. Useful for API development.
  • JSON Formatter — Format, beautify, or minify JSON with customizable indentation.
  • JSON Validator — Validate JSON syntax and find errors with line and column numbers.
  • HTML Minifier — Compress HTML by removing comments, whitespace, and line breaks.
  • CSS Minifier — Minify CSS by stripping comments, whitespace, and unnecessary characters.
  • JavaScript Minifier — Compress JavaScript by removing comments, whitespace, and empty lines.
  • URL Encoder/Decoder — Percent-encode text for URLs or decode encoded URLs back to text.

Browse all free tools · Guides and tutorials · PDF tools · Developer tools · Text tools · SEO tools