ToolCozy
JSON Format / DiffHOTBase64 CodecHOTURL CodecNEWTimestamp ConverterNEWUUID GeneratorHash CalculatorJWT DecoderQR Code GeneratorUnit ConverterNumber BaseData ConverterSQL FormatterIP Lookup
Image CompressHOTColor ConverterImage ConvertImage CropNEWApp Store ScreenshotNEW
Regex TesterNEWWord CounterText DiffMarkdown Preview

More Products

Playbit Games

Free online HTML5 games — play instantly in your browser

Kaola Screenshot

App Store screenshot generator with device frames & templates

Pillease

Simple pill reminder app — never miss a dose again

© 2026 ToolCozy·Privacy·Feedback

Base64 Codec

Base64 encode & decode with UTF-8 support

About this tool

Base64 is an ASCII encoding that turns arbitrary binary data into a text-safe string of 64 printable characters. It's used in HTTP Basic auth headers, data URIs, JWT segments, email attachments (MIME), and anywhere binary bytes need to travel through a text-only channel without corruption.

This tool encodes any UTF-8 text to Base64 and decodes Base64 back to text. Encoding and decoding both run in your browser using the native TextEncoder / TextDecoder + btoa / atob APIs — your input never reaches a server.

How to use

Encode text to Base64

  1. Pick the Encode tab.
  2. Paste or type the original text on the left. Unicode (Chinese, emoji, Cyrillic) is fully supported via UTF-8.
  3. The Base64 output appears on the right as you type and updates automatically. Click Copy to grab it.

Decode Base64 back to text

  1. Switch to the Decode tab.
  2. Paste the Base64 string on the left. Padding (=) is required for standard Base64.
  3. If the string is valid Base64 of UTF-8 text, the decoded text appears on the right. Invalid input shows an error message.

Examples

Encode plain text

Input
Hello, World!
Output
SGVsbG8sIFdvcmxkIQ==

Encode UTF-8 text with multi-byte characters

Input
你好,世界 🌍
Output
5L2g5aW977yM5LiW55WMIPCfjI0=

Decode Base64 back to text

Input
dG9vbGNvenkuY29t
Output
toolcozy.com
Frequently asked questions
Does Base64 encrypt my data?

No. Base64 is encoding, not encryption. Anyone can decode a Base64 string back to its original bytes instantly. Never use Base64 to hide passwords, tokens, or any sensitive data — use proper encryption (AES, etc.) for that.

Why is my decoded output garbled or empty?

Two common causes: (1) the string isn't valid Base64 (wrong characters or missing padding), or (2) the original bytes weren't UTF-8 text — for example, an encoded image or PDF. This decoder assumes the result should be human-readable text.

Why is the encoded output longer than the input?

Base64 represents 3 bytes of input as 4 ASCII characters, so encoded output is roughly 33% larger than the original. That's the cost of making binary safe for text-only transports.

Does this tool support URL-safe Base64 (base64url)?

This tool uses standard Base64 (with + / =). For URL-safe variants used in JWT and similar formats, replace + with -, / with _, and strip = padding manually — or use the JWT decoder which handles base64url internally.

Is there a size limit?

No hard limit, but very large inputs (tens of MB) may freeze the browser briefly during encoding. For files of that size, dedicated CLI tools or streaming encoders are more appropriate.