Is my code saved if I close or reload the tab?
No. This tool doesn't persist your code between visits - closing the tab or reloading the page clears whatever you've written. If you want to keep a snippet, copy it out of the editor pane before navigating away.