Base64 Encode / Decode Tool

Convert text and files to Base64 locally, decode Base64 back to text, and switch to URL-safe output when you need it.

Useful for debugging payloads, preparing data URIs, and checking whether Base64 text decodes cleanly under UTF-8, ASCII, or Latin-1.

Other languages 日本語 English

Why use this Base64 tool?

Text converter

Encode or decode text

The share URL stores settings only. Input text and output text are never placed in the link.

Embed this tool

File converter

Convert a file to Base64

Pick a local file or drop it here. Image files can be previewed immediately from the generated data URI.

Choose a file or drop it here Everything stays in your browser. No upload is performed.

How to use Base64 safely

Use standard Base64 when you are copying data into systems that expect the classic alphabet with +, /, and optional = padding. Use URL-safe Base64 when you need to place the result inside a query string, filename, or token format that rejects those characters.

If your task is percent-encoding for a path or query string rather than byte-to-text conversion, switch to the URL encoder / decoder tool instead of Base64.

Base64 vs. encryption

Base64 only changes binary data into text. It does not hide the contents. If the payload is sensitive, you still need proper encryption or transport security.

Why the output grows

Base64 stores each 3-byte chunk of input as 4 printable characters, so the text normally becomes about 33% larger before line breaks or data URI prefixes are added.

When file to Base64 is useful

File conversion is helpful when you need to inspect a small payload, build a data URI for a prototype, or confirm that an API field accepts the expected format. For large assets, keep in mind that Base64 adds size overhead.

Frequently asked questions

What is the difference between Base64 and URL-safe Base64?

URL-safe Base64 replaces plus with hyphen and slash with underscore so the output is safer to place in URLs and filenames. Some systems also omit padding.

Is Base64 encryption?

No. Base64 is only an encoding. Anyone can decode it, so it should not be treated as a security or privacy measure.

Why is the Base64 output longer than the original?

Base64 usually increases size by about one third because it stores every 3 bytes of input as 4 text characters.

Will my text or file be uploaded?

No. Encoding, decoding, and file conversion happen locally in your browser. Nothing is uploaded automatically.