Is it possible to transform a string into base64 representation?

Hi guys,
Is there a way in KNIME to transform a string into a base64 representation?
I saw that there is a Table to String node from a contributor that transform a whole table into base64 representation but I would need to transform just individual strings. Is this possible?
Thanks in advance.

It would for sure be possible in a Java Snippet. the bigger question is why you would do / need that? base64 is to convert binary data to a string representation.


I’m kind of stuck at the same problem. I need it for a Rest API call, a certain part of a url needs to be in base64.

From “urn:adsk.wipprod:fs.file:vf.EKZOuGboShKXrj24Ezhj4g?version=2” to “dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkVLWk91R2JvU2hLWHJqMjRFemhqNGc/dmVyc2lvbj0y”. Done with

I tried to solve it with a R snippet, as seen here, but no sucess.

You could check out this example and see if you could modify it.


Hello @mlauber71, thanks for the reply.

It took some trial and error but I figured it out.

  • How to use the R snippet.
  • How to instal R stuff on the KNIME server.
  • Lots of trial and error. :scream:

Hi , Can you please tell me how did you converted string to base64? as you have already figured out :slightly_smiling_face: The above knime workflow doesn’t work.

Thank you!

See my answer in the other thread:


Strin to Base64_R.knwf (6.2 KB)

Via R snippet:


base64 <- base64_enc(toString($"string"))

knime.out <- cbind(,base64)

It compains when I don’t force it into an R string, no idea. But should work…


There is a component for it:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.