Yantrasagaram

Base64 Encoder / Decoder

Base64 encoding converts binary data into a text-safe format that can travel through systems designed to handle only plain text, such as email bodies, JSON payloads, and URL query strings. This free online tool lets you encode any plain-text string into its Base64 representation or decode an existing Base64 string back into readable text with a single click. Working with JSON that contains Base64 fields? Format it first with the JSON Formatter. It handles the full UTF-8 character set, so accented letters, emoji, and characters from non-Latin scripts all convert correctly. You can see character counts for both the input and the output at a glance, which is useful when working with size-limited fields. For URL-safe encoding instead, use the URL Encoder / Decoder. All processing runs locally in your browser — nothing is uploaded to a server. Copy the result to your clipboard instantly and paste it wherever you need it.

0 characters

How to Use This Tool

  1. Type or paste your text into the input field. This can be plain text you want to encode, or a Base64 string you want to decode.
  2. Select the direction: Encode to convert plain text to Base64, or Decode to convert Base64 back to readable text.
  3. Review the output in the result area. Character counts for both input and output are displayed so you can gauge the size change.
  4. Click the copy button to place the result on your clipboard, ready to paste into your code, config file, or API request.

Examples

Encoding Plain Text to Base64

Input (plain text)

Hello, World!

Output (Base64)

SGVsbG8sIFdvcmxkIQ==

Decoding Base64 Back to Text

Input (Base64)

SGVsbG8sIFdvcmxkIQ==

Output (plain text)

Hello, World!

Encoding a JSON Payload

Input (plain text)

{"user":"admin","role":"editor"}

Output (Base64)

eyJ1c2VyIjoiYWRtaW4iLCJyb2xlIjoiZWRpdG9yIn0=

What This Tool Is Useful For

Frequently Asked Questions

What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents data using 64 printable ASCII characters (A-Z, a-z, 0-9, +, and /). It was designed so binary data can pass through systems that only handle text, such as email protocols and JSON payloads, without being corrupted.
Why would I use Base64 instead of sending raw text?
Raw text can contain characters that break certain transport layers — newlines, null bytes, or non-ASCII characters may be stripped or misinterpreted. Base64 guarantees the output contains only safe, printable characters. It is commonly used for embedding binary files in HTML/CSS, constructing HTTP authorization headers, and transmitting data through APIs that expect text-only values.
Is Base64 the same as encryption?
No. Base64 is an encoding, not encryption. Anyone can decode a Base64 string without a key or password. It provides zero confidentiality. If you need to protect sensitive data, use proper encryption (such as AES or TLS) before or in addition to Base64 encoding.
Does this tool handle UTF-8 characters correctly?
Yes. The encoder first converts your input to a UTF-8 byte sequence and then Base64-encodes those bytes. This means accented characters (e.g. cafe), emoji, and characters from non-Latin scripts (e.g. Chinese, Arabic, Devanagari) all round-trip correctly through encode and decode.
How much larger does data get after Base64 encoding?
Base64 encoding increases the size by approximately 33%. Every 3 bytes of input become 4 bytes of output. For example, a 300-byte string produces roughly 400 characters of Base64 output. This overhead is the trade-off for text-safe transport.

More Developer Tools

Need to format a JSON payload? JSON Formatter & Validator. Need a strong credential? Password Generator. Generate a QR Code from your encoded data. Browse all utilities in the Developer Tools hub.

Related Tools