Free tool

Base64 Encoder and Decoder

Encode text to Base64 or decode Base64 back to text. Full UTF-8 support for non-ASCII characters. Free, no signup required.

Text input0 chars, 0 bytes

What Is Base64 Encoding?

Base64 is a group of binary-to-text encoding schemes that represent binary data as a sequence of printable ASCII characters. The name comes from the 64 characters used in the encoding alphabet: uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), and two additional characters (+ and /). An = sign is used for padding when the input length is not divisible by three.

Base64 was originally designed for sending binary data through systems that only handle text, such as email (MIME) and early internet protocols. Today, it is widely used in web development, APIs, and data storage wherever binary data needs to be represented as text.

When to Use Base64

Base64 encoding is useful in several common scenarios in web development and software engineering.

  • Data URLs: Embed small images, fonts, or files directly in HTML or CSS without additional HTTP requests. The format is data:mime/type;base64,DATA.
  • Email attachments: MIME encoding uses Base64 to include binary files in email messages, which are fundamentally text-based.
  • API authentication: HTTP Basic Authentication sends credentials as a Base64-encoded string in the Authorization header.
  • JSON and XML payloads: Binary data like images or certificates can be included in JSON or XML by encoding them as Base64 strings.
  • URL-safe tokens: Modified Base64 (using - and _ instead of + and /) is used in JWTs, signed URLs, and other token formats.

Base64 in Web Development

Every modern browser has built-in Base64 support through the btoa() and atob() functions. However, these functions only handle Latin-1 characters. For Unicode and UTF-8 text, you need to use the TextEncoder and TextDecoder APIs first, which is exactly what this tool does.

Keep in mind that Base64 increases data size by about 33%. For large files, it is more efficient to transfer them as binary (using multipart form data or binary streams) rather than encoding them as Base64. Reserve Base64 for small assets, inline data, and cases where a text-only transport is required.

Frequently Asked Questions

More Free Tools

QR code generator

Generate custom QR codes for URLs, text, emails, phone numbers, and WiFi networks.

vCard generator

Create professional digital contact cards (VCF files) to easily share your contact information.

Bio generator

Generate the perfect social media bio for any platform with AI. Free, instant, no signup.

CSS gradient generator

Build beautiful CSS gradients with a visual editor. Linear, radial, and conic with live preview.

Box shadow generator

Design CSS box shadows visually with multiple layers, presets, and live preview.

Meta description checker

Check meta title and description length with a live Google SERP preview.

Favicon generator

Upload an image and generate favicons in all standard sizes. Free, instant, no signup.

Twitter/X Card Validator

Preview how your content will look when shared on Twitter/X. Validate meta tags instantly.

Slug generator

Convert any text into clean, SEO-friendly URL slugs. Supports bulk conversion and options.

JSON formatter

Format, validate, and minify JSON with syntax highlighting and tree view.

Link-in-bio checklist

Interactive 20-item checklist to optimize your link-in-bio page with progress tracking.

Business name generator

Generate unique, brandable business name ideas from your keywords and style preferences.

CTA generator

Generate high-converting call-to-action button text and supporting microcopy.

Headline analyzer

Score your headlines 0 to 100 and get tips to improve click-through rates.

Invoice generator

Create professional invoices for free. Add line items, tax, and notes, then print or save as PDF.

Testimonial formatter

Format customer testimonials into professional cards. 4 styles, copy as HTML or plain text.

Pricing table generator

Build responsive pricing tables for your website. 3 styles, feature lists, and CTA buttons.

Instagram Bio Generator

Generate Instagram bios optimized for 150 characters

TikTok Bio Generator

Generate TikTok bios optimized for 80 characters

Twitter/X Bio Generator

Generate Twitter/X bios optimized for 160 characters

LinkedIn Bio Generator

Generate LinkedIn bios optimized for 220 characters

Facebook Bio Generator

Generate Facebook bios optimized for 101 characters

Threads Bio Generator

Generate Threads bios optimized for 150 characters

Ready to stand out?

Create your page now. Ready in minutes.

Create your page
Free to try, no credit card required

Trusted by individuals and businesses worldwide