Try IBM’s Swift Sandbox [BETA] – an online place to write and compile Swift code.
It’s very easy to use, you are able to start a new Swift file, load your existing Swift file and save it. Currently, the platform is based on Swift 3.1.1 and you can also change the Swift version from the Settings. Surely it will be available for the newer versions of Swift. Stay tuned!