Skip to main content
SlapMyWeb
Skip to tool
Free tool

Base64 encoder & decoder

Encode text to Base64 or decode Base64 strings back to readable text. Supports full Unicode including emojis. 100% client-side.

base64
SGVsbG8sIFdvcmxkISBUaGlzIGlzIGEgQmFzZTY0IGVuY29kaW5nIHRlc3Qu

What is Base64 Encoder & Decoder?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It is widely used in web development to embed images in CSS or HTML (data URIs), encode email attachments (MIME), transmit binary data in JSON APIs, and store credentials in HTTP Basic Authentication headers. This free Base64 encoder and decoder tool lets you convert any text to its Base64 representation or decode a Base64 string back to readable text. Unlike many online tools, this one fully supports Unicode characters including emojis, accented letters, CJK characters, and other multi-byte text through proper UTF-8 encoding. The entire conversion runs in your browser using the native btoa/atob functions with UTF-8 wrapping — nothing is sent to a server, making it safe for encoding API keys, tokens, or other sensitive strings.

How to Use Base64 Encoder & Decoder

  1. 1

    Select encode or decode mode

    Choose "Encode" to convert plain text into a Base64 string, or "Decode" to convert a Base64 string back into readable text. The mode switch is at the top of the tool.

  2. 2

    Enter your text or Base64 string

    Type or paste your input into the text area. For encoding, enter any text including Unicode and emojis. For decoding, paste a valid Base64 string. Invalid Base64 input will show a clear error message.

  3. 3

    Copy the converted output

    The result appears instantly as you type. Click the Copy button to copy the encoded or decoded output to your clipboard for use in your code, API calls, or configuration files.

Features

  • Encode any text to Base64 with full Unicode and UTF-8 support
  • Decode Base64 strings back to readable plain text instantly
  • Handles emojis, accented characters, and multi-byte Unicode correctly
  • Clear error messages for invalid Base64 input during decoding
  • Real-time conversion as you type with zero server round-trips
  • One-click copy to clipboard for quick integration into your workflow

Related Tools

Frequently Asked Questions

What is Base64 encoding used for?+
Base64 is used to safely transmit binary data as text. Common use cases include embedding images as data URIs in HTML/CSS, encoding email attachments in MIME format, passing binary data in JSON API payloads, and encoding credentials for HTTP Basic Authentication.
Does Base64 encoding encrypt my data?+
No. Base64 is an encoding, not encryption. Anyone can decode a Base64 string back to its original form. Never use Base64 as a security measure. For protecting sensitive data, use proper encryption algorithms like AES-256.
Why is my Base64 output larger than the original text?+
Base64 encoding increases data size by approximately 33% because it represents every 3 bytes of input as 4 ASCII characters. This overhead is the tradeoff for being able to safely transmit binary data through text-only channels.
Can I encode files or images with this tool?+
This tool is designed for text-to-Base64 conversion. For encoding files or images, you would need a tool that reads binary file data. However, you can paste the text content of any file to encode it.
Does this tool support URL-safe Base64?+
This tool uses standard Base64 encoding (with + and / characters). URL-safe Base64 replaces + with - and / with _. You can manually replace these characters in the output if you need URL-safe encoding.
Why does decoding fail with an "Invalid Base64" error?+
Base64 strings can only contain the characters A-Z, a-z, 0-9, +, /, and = (padding). If your input contains other characters, spaces, or line breaks, decoding will fail. Remove any whitespace or invalid characters and try again.