Toolvore

Base64 Encoder & Decoder

Encode and decode text or files with Base64, Base64URL, data URI detection, preview and download.

This tool runs entirely in your browser. Your data is never uploaded, never stored, and never leaves your device.

The Base64 Encoder and Decoder converts UTF-8 text or local files with either the Standard or URL-safe alphabet, and turns encoded binary back into a safely previewed, downloadable file.

How to use it

  1. 1Choose Text or File, then Encode or Decode.
  2. 2Pick Standard Base64 or Base64URL and choose padded or unpadded output; complete data URIs are recognised automatically when decoding.
  3. 3Copy text or encoded file data, or inspect the decoded byte signature and download the original binary.

Example

Input
Hello, World!
Output
SGVsbG8sIFdvcmxkIQ==

That is padded Standard Base64. Base64URL changes + to - and / to _, and can omit the trailing equals signs; none of the variants encrypts the input.

What happens to your data

This tool runs entirely in your browser. Your input is never uploaded to a server, never stored, and never logged. Files are capped at 20 MiB and object URLs used for decoded downloads are released when the result changes or the page closes.

Last updated September 2026

Base64 turns bytes into portable ASCII text. Use Text mode for UTF-8 strings such as API values, headers and configuration fragments. Use File mode to encode an image, PDF, archive or other local file, or to turn an encoded binary payload back into a downloadable file. Both directions run inside the browser and the file limit is 20 MiB.

Standard Base64 ends its alphabet with + and /. Base64URL replaces those characters with - and _ so the value fits safely in a URL path, query parameter or JWT segment. Either form can be padded with trailing equals signs or written without them. The controls make those choices explicit when encoding, while the decoder restores missing padding and tells you when the chosen alphabet does not match the value.

A complete data URI such as data:image/png;base64,... is detected without manual prefix removal. In file-encoding mode you can produce either the raw payload or that complete wrapper. A data URI uses padded Standard Base64, and its media type is only a declaration: when decoding, Toolvore checks common binary signatures before showing a raster-image preview and serves the download as generic binary rather than trusting a possibly false or executable type.

How it works

Toolvore first converts text through UTF-8, so emoji and non-Latin scripts round-trip as their real bytes rather than being truncated to one byte per JavaScript character. File mode reads the selected file into a byte array. Three input bytes become four Base64 characters; Standard output can then be translated to Base64URL and trailing padding removed without changing the represented bytes.

Decoding strips whitespace, validates that padding appears only at the end and has the correct length, rejects mixed Standard and URL-safe alphabets, restores omitted padding, and then decodes. Text mode uses strict UTF-8: binary bytes do not turn into replacement characters that look like a successful result, but instead direct you to File mode. File mode shows the first 64 bytes as hex and printable ASCII, recognises a small set of common signatures, previews only raster formats such as PNG and JPEG, and makes an exact-byte download. SVG, HTML and a declared data-URI type are never rendered as trusted content.

The full output remains available to Copy even when the on-screen Base64 preview stops at 500,000 characters. File input and decoded output are capped at 20 MiB; pasted encoded text is also capped before decoding so an unexpectedly large value cannot consume unbounded tab memory. Object URLs created for downloads are revoked when the input changes or the page closes. Nothing is sent to a server.

Common use cases

  • Encoding or decoding UTF-8 values in JSON, YAML and API payloads
  • Converting a local PDF, image or archive to raw Base64 without uploading it
  • Recovering a downloadable file from Base64 or a complete data URI
  • Generating unpadded Base64URL for a URL-safe value or JWT segment
  • Checking the byte signature of an unknown encoded payload before naming it
  • Building an image data URI for HTML or CSS from a small local asset
  • Reading a Base64 value from a Kubernetes secret or configuration file
  • Confirming whether a copied value uses Standard Base64 or Base64URL

Frequently asked questions

Is Base64 encryption?+

No. Base64 is encoding, not encryption — it is fully reversible and provides no security. Never use it to protect secrets.

Does the Base64 file converter upload my file?+

No. Toolvore reads, encodes, decodes and previews the bytes inside your browser. No file or pasted value is sent to a server. Files are capped at 20 MiB because the original bytes and the larger encoded string must coexist in tab memory.

Can I decode Base64 into a PDF, image or ZIP file?+

Yes. Choose File and Decode, paste the raw payload or a full data URI, set a filename and decode it. The page recognises common signatures including PNG, JPEG, GIF, WebP, PDF and ZIP, shows the first 64 bytes for inspection and downloads the exact decoded bytes. A recognised extension is suggested, but it does not prove that the rest of a damaged file is valid.

Why does valid Base64 fail in Text mode?+

A valid Base64 value can represent any bytes, not necessarily UTF-8. Text mode deliberately rejects an invalid UTF-8 sequence instead of replacing bytes with � and pretending the decode succeeded. Switch to File mode to inspect and download the binary unchanged.

How do I decode a Base64 string taken from a URL or a JWT?+

Choose Base64URL before decoding a single URL-safe segment. It uses minus and underscore instead of plus and slash and commonly omits equals-sign padding; the decoder restores that padding. A JWT contains three dot-separated segments, so decode the header and payload separately, not the full token. The third segment is a binary signature, and the dedicated JWT decoder is better when you want the token split automatically.

What do the equals signs at the end of a Base64 string mean?+

They are padding. Base64 writes four characters for each group of three source bytes, so the last group sometimes needs one or two equals signs to reach four characters. They carry no data. Toolvore can emit padded or unpadded raw output and restores omitted padding while decoding, but it still rejects padding in the middle, more than two equals signs, and impossible payload lengths.

Why does Base64 make the data bigger?+

Three bytes become four characters, so the payload grows by about one third before a data-URI prefix or line wrapping is counted. Base64 is a transport encoding, not compression. A linked image can also be cached separately, while an inlined data URI travels with every copy of its document, so large assets are usually better left as files.

What is the difference between Standard Base64 and Base64URL?+

They represent the same bytes. Base64URL replaces Standard Base64's plus with minus and slash with underscore, and it often drops trailing padding, which avoids characters with special meaning in URLs and filenames. Do not confuse Base64URL with percent-encoding: percent-encoding escapes selected URL characters, while Base64URL rewrites every source byte into a separate alphabet.

Does the decoder trust the MIME type in a data URI?+

No. A prefix can claim that arbitrary bytes are image/png or text/plain. Toolvore reports that declaration but separately checks common file signatures, previews only recognised raster images, never renders SVG or HTML, and serves the download as application/octet-stream. Signature checks identify a likely format; they are not malware scanning or full file validation.

Can this decode a data URI automatically?+

Yes. Paste the complete data:...;base64,... value in either decode mode. Parameters such as charset are allowed, whitespace in the payload is ignored and the media type is reported. A data URI without the ;base64 marker is percent-encoded data rather than Base64 and is rejected instead of being mis-decoded.