Base64 Encoder & Decoder | UTF-8, URLs & Data URI

EncodingRuns in Your Browser (No Uploads)
Loading…

Encode text to Base64 or decode Base64 back to readable text—right in your browser. Fully supports UTF-8 (all Unicode), works with URLs and Data URIs, shows size growth (~33%), and never uploads your data.

How to Use This Tool

  1. 1

    Choose Encode (text → Base64) or Decode (Base64 → text).

  2. 2

    Paste or type your input; Live mode updates instantly (use Manual for large data).

  3. 3

    Copy the output or download it as a .txt file.

  4. 4

    Use Swap to send output back to input and switch modes fast.

  5. 5

    For Data URIs, prepend a prefix like data:text/plain;base64, to the encoded result.

Use Cases & Examples

Email Attachment Encoding (MIME)

Encode binary attachments as text for email transports; clients decode them automatically (MIME).

REST API & JSON Data Transfer

Embed binary in JSON by encoding to Base64 in request/response bodies.

Data URIs for Embedded Assets

Inline small images/assets (data:image/png;base64,...) to reduce extra HTTP requests.

JWT & Web Auth Debugging

Inspect Base64URL-encoded headers/payloads in JWTs during development.

Text-Only Storage and Configs

Store binary content in text-only systems (configs, env vars) via Base64.

What is Base64?

Base64 represents binary using 64 ASCII characters; '=' padding ensures output length is a multiple of 4 (RFC 4648).

Encoding processes every 3 bytes as 4 Base64 characters, increasing size by roughly one third.

Base64 is not encryption—use transport security or cryptographic algorithms for confidentiality.

Frequently Asked Questions

Q.Is Base64 encryption? Is it secure for protecting sensitive data?

A. No. Base64 is encoding, not encryption—anyone can decode it. Use TLS/HTTPS or cryptography (e.g., AES/RSA) for security.

Q.Why does Base64-encoded data appear larger than the original?

A. Encoding maps 3 bytes to 4 Base64 characters (≈33% increase) and uses '=' padding to make the length a multiple of 4.

Q.Can I encode Korean, Chinese, emojis, or special characters?

A. Yes. UTF-8 support handles all Unicode correctly, including Korean, Chinese, emojis, and accented letters.

Q.Can I encode files (images, PDFs, documents) to Base64?

A. This tool converts text only. For binaries, use a file-to-Base64 method or generate a Data URI with another tool.

Related Tools

Explore more developer tools

Browse All Tools