Home Text Tools Math & Numbers Developer Date & Time Image Tools Blog
Developer Tools Private & secure

Base64 Encoder / Decoder

Encode plain text to Base64 or decode Base64 back to text — all in your browser.

Convert plain text or binary data to Base64 encoding and decode Base64 strings back to readable text in seconds. Widely used by developers for embedding images in CSS, encoding API credentials, and handling binary data in JSON payloads.

Features of the Base64 Tool

Text Encoding
Encodes any UTF-8 text string into Base64 format instantly.
Base64 Decoding
Decodes Base64 strings back to the original plain text or binary data.
URL-Safe Base64
Supports URL-safe Base64 encoding (replacing + with - and / with _) for use in URIs and tokens.
File Encoding
Encode small files or images to Base64 data URIs for embedding in HTML or CSS.
One-Click Copy
Copy the encoded or decoded result to clipboard instantly.

Use Cases: When This Tool Helps

  1. Embed small files in code

    Encode icons, fonts, or certificates as Base64 to include them directly in HTML, CSS, or JSON.

    Read the guide →
  2. Debug email attachments

    Decode Base64 parts of raw emails to see what an attachment or message really contains.

  3. Work with API authentication

    Build or inspect Basic Auth headers that use Base64-encoded username:password.

  4. Read encoded config values

    Decode Kubernetes secrets and environment values stored in Base64.

  5. Pass data safely in URLs

    Use URL-safe Base64 to send binary or special-character data in links and cookies.

  6. Investigate suspicious scripts

    Security analysts can decode Base64 strings hidden in malware or phishing pages.

How to Use the Base64 Encoder & Decoder

  1. Select 'Encode' or 'Decode' mode using the toggle.
  2. Paste your text or Base64 string into the input field.
  3. The result appears instantly in the output area.
  4. Click 'Copy' to copy the result to your clipboard.

FAQ

What is Base64 encoding used for?▾

Base64 is used to encode binary data as ASCII text, commonly for email attachments, data URIs in HTML/CSS, and API authentication headers.

Is Base64 encryption?▾

No. Base64 is encoding, not encryption. It is easily reversible and provides no security by itself.

What is URL-safe Base64?▾

URL-safe Base64 replaces + with - and / with _ so the encoded string can be safely included in URLs without percent-encoding.

Does this tool work with binary files?▾

You can encode small text-based files. For large binary files, a local tool or command-line base64 utility is recommended.

Base64 Developer Use Cases

  • Embed small images as data URIs in CSS to eliminate extra HTTP requests.
  • Encode username:password for HTTP Basic Authentication headers.
  • Store binary configuration data in JSON or YAML config files.
  • JWT tokens use Base64url encoding for header and payload sections.
  • Linux/macOS: use `base64 -d` in the terminal to decode Base64 from the command line.

More Tools in This Category

JSON Formatter & Validator
Format, validate, and minify JSON data instantly
URL Encoder / Decoder
Encode or decode URL-safe strings
Color Code Converter
Convert color codes between HEX, RGB, and HSL formats
Strong Password Generator
Generate strong, secure passwords with custom rules
CSS Formatter & Beautifier
Format and beautify or minify CSS code online
HTML Formatter & Beautifier
Format and beautify or minify HTML code with proper indentation
XML Formatter & Beautifier
Format and validate XML. Check if XML is well-formed
CSV Formatter Online
Format CSV data and preview it as a table with multiple delimiter support
CSV to JSON Converter
Convert CSV data to a JSON array instantly
JSON to CSV Converter
Convert a JSON array to CSV format instantly
JSON to JSONP Converter
Wrap JSON in a JSONP callback function for cross-domain requests
JSONP to JSON Converter
Strip JSONP callback wrapper and extract the pure JSON
Cron Job Expression Generator
Generate cron expressions with human-readable descriptions and presets
Mask Sensitive Data
Mask emails, phone numbers, and credit cards in text
Password Strength Checker
Check password strength with a live meter and criteria checklist
Random Email Generator
Generate random email addresses for testing and development
Random Username Generator
Generate random usernames in various styles for accounts and profiles
Domain Name Extractor
Extract domain names from URLs and text with deduplication
Sitemap XML Validator
Validate sitemap XML structure and list all URLs found
Online Screen Keyboard
Virtual on-screen keyboard with shift, caps lock, and copy support
UUID Generator
Generate random UUID v4 or timestamp-based UUID v1 in bulk
Hash Generator (SHA-256 / MD5)
Generate SHA-256, SHA-1, and MD5 hashes from any text
HTML Entity Encoder / Decoder
Encode or decode HTML special characters and entities
Regex Tester
Test regular expressions with live match highlighting
JWT Decoder
Decode JWT tokens and inspect header and payload
JSON to YAML Converter
Convert JSON data to YAML format in the browser
YAML to JSON Converter
Convert basic YAML to pretty-printed JSON
SQL Formatter Online
Format and beautify SQL queries or minify to one line
Number to Words Converter
Convert integers up to 999 billion into English words
CSS Gradient Generator
Build linear or radial CSS gradients visually and copy ready-to-use CSS code
Color Palette Generator
Generate complementary, analogous, triadic, and monochromatic color palettes
Color Contrast Checker
Check color contrast ratio for WCAG 2.1 AA and AAA accessibility compliance
Meta Tag Generator
Generate complete HTML meta tags including SEO, Open Graph, and Twitter Card tags
Robots.txt Generator
Generate a robots.txt file with custom crawler rules, disallow paths, and sitemap URL
Image to Base64 Converter
Convert PNG, JPG, GIF, SVG, or WebP images to Base64 data URI for HTML and CSS
QR Code Generator
Generate QR codes from URLs, text, email, phone, or Wi-Fi. Download as PNG or SVG
CSS Box Shadow Generator
Visually build CSS box-shadow styles with live preview and copy the CSS code
CSS Flexbox Generator
Configure flexbox container properties visually with live preview and copy CSS
PX ↔ REM / EM Converter
Convert CSS units between pixels, REM, and EM with bulk conversion and reference table
UTM Link Builder
Build UTM-tagged campaign URLs for Google Analytics. Add source, medium, campaign, and more
URL Parser & Analyzer
Parse any URL into protocol, hostname, path, query parameters, and hash. Edit and rebuild URLs
CSS Border Radius Generator
Control each corner radius individually with live preview and copy the CSS code
JSON ↔ XML Converter
Convert JSON to XML and XML to JSON instantly with formatted output
CSS Grid Generator
Build CSS grid layouts visually with live preview and instant code export
IP Address Lookup
Look up geolocation, ISP, and timezone for any IP address instantly
HTTP Status Codes
Complete reference for all HTTP status codes 1xx–5xx with descriptions
Color Blindness Simulator
Simulate how images and colors appear with different types of color blindness
Markdown Table Generator
Build Markdown tables visually and copy the code instantly.
Image to Base64
Convert any image to Base64 data URI for embedding in code.
CSV to HTML Converter
Convert CSV data to HTML in your browser
CSV to TSV Converter
Convert CSV data to TSV in your browser
CSV to XML Converter
Convert CSV data to XML in your browser
JSON to HTML Converter
Convert JSON data to HTML in your browser
JSON to TSV Converter
Convert JSON data to TSV in your browser
XML to CSV Converter
Convert XML data to CSV in your browser
XML to HTML Converter
Convert XML data to HTML in your browser
XML to TSV Converter
Convert XML data to TSV in your browser
HTML Color Codes
Pick a color and get HEX, RGB, HSL and CMYK codes
XML Escape and Unescape
Escape special characters for XML or decode entities
JavaScript Formatter
Beautify minified or messy JavaScript code
JavaScript Minifier
Reduce JavaScript file size for production
JavaScript Obfuscator
Make JavaScript harder to read and copy
JSON Editor
Edit JSON in a tree view or as text
HTML CSS JS Playground
Write front-end code and see a live preview
CSS Font Stacks
Preview and copy web-safe CSS font stacks
.htaccess Generator
Create Apache redirect, security and caching rules
Chmod Permissions Calculator
Convert Linux permissions between octal and symbolic
Email Address Validator
Check email format for one address or a full list