# Base64 encode and decode

> Encode text to Base64 or decode Base64 to text, UTF-8 safe, with a URL-safe option. URL-encode and decode too. Runs in your browser, nothing uploaded.

URL: https://tools.cuelark.com/base64-encode-decode
Publisher: Cuelark Team (https://cuelark.com)
Updated: 2026-11-10
Price: free, no sign-up
Privacy: runs in the browser; files are not uploaded

Paste text to encode it to Base64, or paste Base64 to decode it, with full UTF-8 support (accents, emoji, any script) and a URL-safe variant. URL percent-encoding is one click away.

## How to use it

1. Pick Encode or Decode (or URL-encode / decode).
2. Paste text, or drop a text file onto the box.
3. The output updates as you type; copy it or download JSON.

## Details

- **Encoding:** UTF-8 bytes to standard Base64 (RFC 4648), or URL-safe with - and _ and no padding
- **Decoding:** Accepts standard or URL-safe, with or without padding; reports byte count and whether it is valid UTF-8
- **URL encoding:** encodeURIComponent / decodeURIComponent

## Questions

### Is Base64 encryption?

No. Base64 is an encoding that anyone can reverse. Don't use it to hide passwords or secrets.

### Why does my decoded text look garbled?

The data is probably binary (an image or a zip), not text. The tool tells you when the bytes are not valid UTF-8.

### What is URL-safe Base64?

A variant that uses - and _ instead of + and /, and drops the = padding, so the result can go in a URL or filename. JWTs use it.

### Is what I type sent anywhere?

No. The calculation runs in this browser tab with the same code our MCP server uses. Nothing you type is sent to a server or saved, apart from settings like filing status, which stay in this browser.

### Can an AI agent use this?

Yes. The same function is a tool on our free MCP server at tools.cuelark.com/mcp, so ChatGPT, Claude or Cursor get exactly the answer this page shows. 'Copy MCP call' gives you the arguments.

## Related tools

- [Routing number validator](https://tools.cuelark.com/routing-number-validator)
- [Cron expression generator](https://tools.cuelark.com/cron-expression)
- [Token counter](https://tools.cuelark.com/token-counter)
- [Broken link checker](https://tools.cuelark.com/broken-link-checker)
