How do I save this to a file? I am new to nodered and finding this confusing.
Have you tried removing the data:image/jpeg;base64,
from the string before passing it through the base64 node.
Since you are using image-tools, simply remove the base64 node.
Image-tools knows what to do with the base64 image data.