iLoveDocsTools
All ToolsEncode / Decode Base64

Encode / Decode Base64

Encode plain text to Base64 or decode Base64 back to text. Handles Unicode and special characters.

GuestGUEST

10 uses remaining today

Your files never leave your device. All processing happens locally in your browser — nothing is uploaded to our servers.Files are never stored on our servers · No tracking of your file contentsPrivacy Policy

What is Encode / Decode Base64?

Encode/Decode Base64 is a free online tool that encodes plain text to Base64 format or decodes Base64 back to readable text. Base64 is used throughout web development — in data URIs, JWT tokens, HTTP Basic authentication, and email attachments.

How It Works

Encoding uses the browser's btoa() function (with UTF-8 support via TextEncoder for Unicode). Decoding uses atob(). Both run entirely client-side. Unicode characters outside Latin-1 are handled by percent-encoding before the btoa call.

How to Use

  1. 1

    Paste text or binary data

    Enter the text you want to encode, or paste a Base64 string you want to decode.

  2. 2

    Encode or decode

    Click "Encode to Base64" to convert text to Base64, or "Decode from Base64" to reverse the operation.

  3. 3

    Copy the result

    Copy the encoded or decoded output to your clipboard for use in code, APIs, or emails.

  4. 4

    Encode files (optional)

    Use the Encode Image to Base64 tool to convert image files to Base64 data URLs for embedding in HTML or CSS.

Who Uses This Tool

🔑

HTTP Basic Authentication

Encode "username:password" to Base64 for use in the Authorization: Basic header of HTTP requests.

🖼️

Data URI Inspection

Decode a data:image/png;base64,... URI to inspect or extract the raw bytes of an embedded image.

📧

Email Attachment Encoding

Encode binary attachment content to Base64 to embed it safely within MIME-formatted email messages.

🔐

JWT Payload Reading

Decode the Base64URL-encoded middle section of a JWT token to read its JSON payload without a library.

📦

API Payload Encoding

Encode binary or Unicode content to Base64 so it can be transmitted safely through JSON API fields.

🛠️

Debugging Encoded Strings

Quickly decode an unknown Base64 string encountered in logs, configs, or source code to see its raw value.

Why Choose This Tool

Unicode Support

Handles multi-byte Unicode characters correctly using percent-encoding before the btoa call, preventing encoding failures.

Clear Error Messages

Invalid Base64 input produces a descriptive error rather than silently returning garbage, so issues are immediately obvious.

One-Click Mode Switch

Toggle between encode and decode modes with a single button tap without clearing your existing text.

Instant Processing

Encoding and decoding run synchronously in the browser so results appear the moment you click.

No Size Limit

Handles arbitrarily long strings in the browser without any file-size restrictions or timeouts.

Private by Default

No text is ever sent to a server, making this safe for encoding credentials, tokens, and sensitive payloads.

Key Benefits

  • Encode or decode with a single click
  • Handles Unicode and special characters correctly
  • Shows clear error messages for invalid Base64 input
  • Copy output instantly
  • No data leaves your browser

Frequently Asked Questions

Also Known As

base64 encoder decoder online freeencode text to base64 onlinedecode base64 string onlinebase64 converter browser basedonline base64 encode decode toolbase64 decoder no installconvert text to base64 onlinebase64 encoding tool free

Trusted Worldwide

Free Online Document Tools for Everyone

iLoveDocsTools is used by students, professionals, and businesses across the United States, Canada, United Kingdom, Australia, India, and more than 100 other countries. All tools are browser-based and process files privately — your files never leave your device. Free to use, with Pro plans for unlimited access.

No Upload Required

All processing happens directly in your browser. Your documents are never sent to any server — complete privacy guaranteed for users in the USA, Canada, UK, and worldwide.

Free to Use — Pro Plans Available

Every tool on iLoveDocsTools is free to use. Need more? Upgrade to Pro for unlimited usage, priority access, and no daily limits. Trusted by students, freelancers, and teams across North America and Europe.

Works on Any Device

Whether you are on a Mac, Windows PC, iPhone, or Android in New York, Toronto, London, or Sydney — our tools work instantly in any modern browser.

Looking for free PDF tools in the USA? Free document converters in Canada? Online PDF editors in the UK or Australia? iLoveDocsTools offers 70+ free tools — merge PDF, split PDF, compress PDF, convert Word to PDF, Excel to PDF, JPG to PDF, and many more — all free, all instant, all private. No watermarks. No file size limits. Just free tools that work.