Base64 Convertor
Base64 convertor

What is Base64

  • Base64 is the one of the binary to string encoding format that represents binary data in plain text format.
  • Binary to string encoder is a group of encoding format that encodes binary to printable and readable characters.
  • This makes easy to share the base64 in a communication medium where you can send only text characters.
  • The base64 can be used to encode any kind of binary data to text format (example: png,jpg images, texts, etc.).
  • Each base64 digit represents 6 bits of data.
  • So three 8 bits of binary/string can be represented as four 6 bit of data.
  • This causes the size of base64 to increase roughly around 3 times based on the length of the string and padding characters are used or not.
  • This can cause problems in places where size matters.

Example Base64

  • You can check the base64 encoded version of text I love you below.

   SSBsb3ZlIHlvdQ==

Base64 Encoder And Decoder

  • Base64 encoder/decoder is a free online tool to encode string to base64 and decode base64 back to string.
  • This tool contains a number of features like syntax highlighting, auto-completion.
  • This advanced base64 encoder/decoder tool is a full-fledged text editor in which you can search for particular text, jump to a particular line, delete all the contents of the editor, copy the text contents of the editor, wrap the line, and you can make the editor full screen and full-screen window mode.
  • You can download the base64 encoder/decoder string in the editor as a text file and as pdf file formats. All you need to do is to choose the file type from the dropdown and click on the Download Icon
    in the respective editor.
  • You can name the download file as you wish. Enter the download file name in the download file name text box.
  • You can ENCODE the string to base64 by clicking on the encode button, and you can use the DECODE button to decode the base64 to string.
  • By checking the Auto Encode on Edit checkbox you can automatically encode the string to base64 upon the content edit.
  • By checking the Auto Decode on Edit checkbox you can automatically decode the base64 to string upon the content edit.
  • In case of an accidental reload of this website, editor preserves the content and populate the editor with the last entered content.

Base64 in javascript

  • Base64 have greater support in javascript.
  • You can encode the string using btoa, but this supports only ASCII encoding.

    console.log(btoa("I love you"));
  • You can decode the base64 encoded string using atob.

   console.log(atob("SSBsb3ZlIHlvdQ=="));

What You Can Do?

  • Encode string to base64, Decode base64 to string.
  • Download the content as text file and as pdf file.

Limitations

  • When you try to upload file greater than 5MB, you will not be able to edit in the text editor as browser will not be able to handle large text and cause the browser to freeze.
  • But you can still encode/decode and download.
  • If you try to download the large file as pdf, it may take some time to prepare the pdf. Please be patience.