December 1New requirements for 5 groups: grocery products, animal feed, clothing and household linen, and 2 more · What to do
EN
Sign inTry for free

Free · works in the browser

Base64: online encoding and decoding

Text and files to Base64 and back: Cyrillic in UTF-8, URL-safe, line wrapping. We detect the file type by content and show images and PDFs right away.

  • Text and files, UTF-8
  • URL-safe and data: URI
  • File type by content
Text

Base64

What Base64 is and why it’s needed

Base64 is a way to represent any binary data (files, images, keys, signatures) as a string of 64 safe characters: Latin letters, digits, + and /. It’s needed where a channel carries only text: JSON bodies and HTTP headers, email, configs, certificate attributes, the contents of signatures and encrypted CMS messages.

When encoding, every 3 bytes turn into 4 characters, so a Base64 string is about a third longer than the source data. Decoding does the reverse. Our tool does both instantly, as you type.

Tool features

  • Text ↔ Base64 both ways, correctly handling Cyrillic and any Unicode characters (UTF-8).
  • Files: encode any file to Base64, and when decoding, download the result as a file; handy for images, keys and attachments.
  • URL-safe (base64url): the variant with characters - and _ without padding, as in JWT and link parameters.
  • Line wrapping at 76 characters: the format for PEM, email and older systems.
  • 100% in the browser: nothing is uploaded to the server, and the tool works even offline.

How to use it

  1. Choose the direction: Encode or Decode.
  2. Paste text (or Base64) into the left field or upload a file.
  3. The result appears on the right automatically: copy it or download it as a file.

Base64, electronic signatures and marking

Base64 comes up all the time when working with electronic signatures and the Chestny ZNAK API: certificates, detached signatures .sig, encrypted messages and marking codes are passed in this form. If you need more than re-encoding, and want to look into the structure or sign a document, our other tools will help: GOST signing and signature verification and the built-in ASN.1 decoder for analyzing certificates and CMS.

Questions

Frequently asked questions about Base64

Didn’t find the answer? Write to us; an expert replies within 15 minutes on average. About CryptoPro and signing in the account, see the knowledge base.

Is the data sent anywhere?

No. Encoding and decoding run in JavaScript entirely in your browser: the data isn’t sent to the server or saved anywhere. The tool works even without an internet connection.

Is Cyrillic supported?

Yes. Text is encoded in UTF-8, so Russian letters, currency symbols (₽, €) and emoji are converted and restored correctly.

How is base64url different from regular Base64?

In the URL-safe variant, the characters + and / are replaced with - and _, and the padding = is removed. This format is safe in links and is used, for example, in JWT. Tick the “URL-safe” box.

Can I encode an image or a file?

Yes. Click “File…” in “Encode” mode, and the file turns into a Base64 string (for example, for a data URI). When decoding, click “Download file” to get the original bytes.

Why do I see “binary data” when decoding?

It means the decoded bytes aren’t text (an image, archive, key and so on). Click “Download file” to save them in their original form.

A certificate in half a minute. Marking in Truemark is just as simple

Sign up and get your first codes in 5 minutes. 7 days of full access free, no card required.

Try for freeSales: +7 812 765-02-50 · info@truemark.ru

Or leave a request

We’ll answer about volumes, pricing and getting started. Leave your phone or email and your question in the request form.