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.

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.

Font generator

Convert text into fancy Unicode fonts for Instagram, TikTok, Twitter, and other social media bios.

Character counter

Count characters, words, and sentences with real-time social media platform limits.

Hashtag checker

Check if your Instagram hashtags are banned or restricted before posting.

OG tag generator

Generate Open Graph and Twitter Card meta tags with live social media previews.

UTM builder

Build UTM-tagged campaign URLs for Google Analytics tracking.

Image size guide

Every social media image dimension in one place, always up to date.

Engagement rate calculator

Calculate your social media engagement rate for Instagram, TikTok, YouTube, and Twitter/X with benchmarks.

Email signature generator

Create professional HTML email signatures with live preview. Multiple styles, free, no signup.

Color palette generator

Generate harmonious color palettes using color theory. Complementary, analogous, triadic, and more.

Aspect ratio calculator

Calculate image and video aspect ratios instantly. Find the right dimensions for any platform.

Contrast checker

Check color contrast ratios for WCAG AA and AAA compliance. Ensure your text is accessible.

robots.txt generator

Generate a robots.txt file to control search engine and AI crawler access to your website.

Lorem Ipsum generator

Generate placeholder text in paragraphs, sentences, words, or list items. Instant, free.

Markdown to HTML converter

Convert Markdown to clean HTML with a live side-by-side editor. Preview or copy the source.

Word counter

Count words, characters, sentences, and paragraphs. Get readability scores and keyword density.

Instagram Engagement Calculator

Calculate your Instagram engagement rate with benchmarks

TikTok Engagement Calculator

Calculate your TikTok engagement rate with benchmarks

YouTube Engagement Calculator

Calculate your YouTube engagement rate with benchmarks

Twitter/X Engagement Calculator

Calculate your Twitter/X engagement rate with benchmarks

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