CorrectionCopy A COMPLETE LIBRARY OF 150 FREE TOOLS ONLINE

Base64 Encoder & Decoder Online

Encode UTF-8 text or any file to Base64, decode standard Base64 or Base64URL back to readable text or downloadable bytes, and create Data URIs directly in your browser.

Text & file Base64 converterUTF-8, Base64URL, Data URI and binary download support
Processed in this browser
Text or file to encodeReady
Drop a file here or click to chooseAny file type can be encoded. No artificial file-size limit is imposed.
Selected file

Text is encoded as UTF-8 before Base64 conversion, so emoji and non-Latin scripts remain byte-correct.

Encoding file…0%
Base64 outputWaiting for input

Use Copy Base64 or download the generated text after checking the result.

0Input characters
0Output characters
0 BDecoded / source bytes
StandardBase64 variant

Useful next steps

Your Base64 task is complete. Continue with another related CorrectionCopy tool.

How to use the Base64 encoder and decoder

The workflow changes automatically between encoding and decoding, while text conversion remains live as you type or paste.

Choose Encode or Decode

Use Encode for text or a local file. Use Decode for a standard Base64 string, Base64URL value or complete Base64 Data URI.

Enter text or choose a file

Paste Unicode text, drag in a file, or paste encoded data. URL-safe output and Data URI wrapping are available when encoding.

Copy or download the result

Copy Base64 or decoded text, download Base64 as TXT, or download decoded binary bytes as the detected file type when possible.

Base64 encoding for text, Unicode, images and files

This Base64 converter works with UTF-8 text and arbitrary file bytes. It covers common text-to-Base64, file-to-Base64, image-to-Base64 and Base64-to-text workflows without sending the selected content to a conversion server.

UTF-8 text to Base64

Text is converted to UTF-8 bytes first, so emoji, Bengali, Arabic, Chinese, accented Latin text and other Unicode characters are encoded correctly rather than being passed directly to legacy Latin-1-only APIs.

File and image to Base64

Encode JPG, PNG, PDF, DOCX, ZIP, JSON, audio, video or other file bytes. File processing uses chunks to reduce temporary memory overhead compared with creating one huge Data URL first.

Base64 to file

Decoded binary data can be downloaded again. Common PNG, JPEG, GIF, WebP, PDF, ZIP and GZIP signatures are recognized so the downloaded extension is more useful when the input itself does not include a MIME type.

Standard Base64, Base64URL and Data URI differences

Base64 has several closely related representations. Using the correct variant matters when encoded data is placed in URLs, JWT segments, HTML, CSS or API payloads.

TaskWhat this tool doesCommon search / use case
Standard Base64Uses A–Z, a–z, 0–9, + and / with normal = padding when required.Base64 encoder, text to Base64, file to Base64, API payloads
Base64URLUses - and _ instead of + and / and omits trailing padding in encoded output.URL-safe Base64, JWT Base64 decode, OAuth and URL parameters
Data URIWraps file Base64 with a data:MIME-type;base64, prefix using standard Base64.Image to Base64 Data URI, HTML image Base64, CSS background Data URL
Decoded textInterprets decoded bytes as strict UTF-8 when they form valid text.Base64 to text, Base64 decoder online, decode Unicode Base64
Decoded binaryKeeps the original bytes and enables a direct file download instead of pretending binary data is text.Base64 to image, Base64 to PDF, Base64 to file
Important: Base64 is an encoding, not encryption. It does not protect passwords, API keys, credentials or private data. Anyone who has the encoded string can normally decode it.

Why this Base64 converter uses the browser's current byte APIs

Modern browsers can encode and decode byte arrays directly. The tool uses the native byte-to-Base64 path when available and falls back to a compatible chunked implementation on older browsers. This avoids requiring a third-party Base64 library and keeps the processing path small.

Unicode-safe conversion

Legacy btoa() accepts a binary string rather than arbitrary Unicode text. Encoding through TextEncoder first produces the correct UTF-8 bytes before Base64 is generated.

Strict binary handling

A decoded byte sequence is only shown as readable text when it is valid UTF-8 or its Data URI MIME type explicitly represents text. Otherwise the bytes remain downloadable binary data.

No artificial local file limit

The page does not impose a fixed upload-size cap. Practical capacity depends on available browser memory because a Base64 result is itself larger than the original binary input.

Common Base64 developer workflows

Base64 is widely used when binary bytes need to travel through text-oriented formats, but it should be chosen for compatibility rather than secrecy.

JSON and API payloads

Encode binary attachments when an API field accepts textual Base64 instead of multipart binary data. Check the receiving API's exact alphabet and padding requirements.

HTML and CSS Data URIs

Small images or other assets can be represented as a data: URL. Large inline assets can increase document size and hurt caching, so Data URIs are best used selectively.

JWT inspection

JWT header and payload segments use Base64URL. Decoding a segment lets you inspect its text, but it does not verify the token signature, authenticity or authorization.

HTTP Basic Authentication

Basic Authentication encodes the username:password bytes as Base64. HTTPS is still essential because Base64 alone provides no confidentiality.

Email and MIME content

Base64 is commonly used to transport binary attachments through systems that historically expect text-safe content. MIME-formatted Base64 may contain line breaks.

Configuration and debugging

Developers often decode Base64 strings from logs, environment values, API responses or test fixtures. Review decoded content before treating it as trusted input.

Privacy, performance and Base64 limitations

The page-specific converter performs encoding and decoding in your browser. It does not upload the entered text or selected file to CorrectionCopy for Base64 processing, and it adds no Base64-specific tracker or database.

Base64 makes data larger

Every 3 bytes become 4 Base64 characters before optional padding, so Base64 normally adds about one-third to the raw binary size. Data URI prefixes add a small amount more.

Large files need browser memory

Chunked file reading lowers temporary peaks, but the complete Base64 string still has to exist if it is displayed or copied. Very large conversions can therefore be limited by the device's available memory.

Decoded content is not automatically safe

Do not execute decoded scripts, open unknown files blindly, or assume decoded data is trustworthy. Base64 can carry any bytes, including malicious or misleading content.

Troubleshooting Base64 encode and decode errors

“Invalid Base64”

Check for non-alphabet characters, misplaced = padding, a one-character final quantum, or a mixed standard/Base64URL alphabet. Enable whitespace handling for wrapped MIME-style Base64.

Decoded result is binary

This usually means the Base64 represents a file rather than UTF-8 text. Use Download Decoded File instead of forcing those bytes into a text editor.

Large file conversion feels slow

Base64 expands the data and the browser must build a large output string. Close memory-heavy tabs or use a device with more free memory for very large files.

More Free CorrectionCopy Tools

Continue with active text, data, file, image and developer tools from the current CorrectionCopy catalog.

Base64 Encoder & Decoder FAQ

What does a Base64 encoder do?

A Base64 encoder converts bytes into a restricted ASCII representation using the Base64 alphabet. Text is first represented as bytes, while files are encoded from their original binary bytes.

How do I convert text to Base64?

Choose Encode, type or paste the text into the input box, then copy or download the generated Base64. This tool encodes text as UTF-8 before Base64 conversion.

How do I decode Base64 to text?

Choose Decode and paste the Base64 string. If the decoded bytes form valid UTF-8 text, the readable text appears in the result area and can be copied or downloaded.

Does the Base64 decoder support emoji and Unicode?

Yes. UTF-8 text can include emoji, accented characters, Bengali, Arabic, Chinese, Japanese and other Unicode scripts. Correct decoding still requires the original bytes to represent UTF-8 text.

Can I encode an image, PDF, ZIP or other file to Base64?

Yes. In Encode mode, choose or drop any local file. The page reads its bytes in chunks and generates a Base64 string. Data URI wrapping can also be enabled for a selected file.

Can I decode Base64 back to an image or PDF file?

Yes. If Base64 represents binary data, the tool keeps the decoded bytes and enables Download Decoded File. Common image, PDF, ZIP and GZIP signatures are detected when possible.

What is Base64URL?

Base64URL is the URL- and filename-safe alphabet defined alongside Base64. It replaces + and / with - and _, and many Base64URL uses omit = padding. It is commonly used in JWTs and URL-oriented protocols.

Can this tool decode a JWT?

It can decode an individual Base64URL-encoded JWT header or payload segment to readable text. It does not validate the JWT signature or prove that the token is authentic.

What is a Base64 Data URI?

A Data URI places encoded bytes directly after a data: MIME-type;base64, prefix. It is commonly used for small inline images or assets in HTML and CSS. The decoder can also recognize a Base64 Data URI and use its MIME type when downloading bytes.

Is Base64 encryption?

No. Base64 is reversible encoding and provides no confidentiality. Do not use Base64 alone to protect passwords, credentials, API keys or sensitive files.

Why is Base64 larger than the original file?

Base64 represents each 3 input bytes with 4 encoded characters, so the encoded data is normally about 33% larger before small additions such as padding or a Data URI prefix.

Is there a file-size limit?

The tool does not impose an artificial local file-size limit. Very large files can still exceed available browser memory because the full Base64 output is larger than the original file and must exist for display, copy or download.

Are my text and files uploaded for conversion?

No page-specific conversion upload is used. The Base64 transformation is performed by browser JavaScript on the device. Clearing or leaving the page removes the tool's in-memory state.

Why does a Base64 string show as invalid?

Typical causes are unsupported characters, mixed Base64 and Base64URL alphabets, misplaced padding, or an impossible final length. If the encoded value is wrapped across lines, leave Ignore whitespace enabled in Decode mode.