Install Swift - macOS
Install Swift
1. Install Swift via Swiftly
To download toolchains from Swift.org, use the Swiftly toolchain installer. Swift.org toolchains support Static Linux SDK, include experimental features like Embedded Swift and support for WebAssembly.
curl -O https://download.swift.org/swiftly/darwin/swiftly.pkg && \
installer -pkg swiftly.pkg -target CurrentUserHomeDirectory && \
~/.swiftly/bin/swiftly init --quiet-shell-followup && \
. "${SWIFTLY_HOME_DIR:-$HOME/.swiftly}/env.sh" && \
hash -rcurl -O https://download.swift.org/swiftly/darwin/swiftly.pkg && \
installer -pkg swiftly.pkg -target CurrentUserHomeDirectory && \
~/.swiftly/bin/swiftly init --quiet-shell-followup && \
set -q SWIFTLY_HOME_DIR && \
source "$SWIFTLY_HOME_DIR/env.fish" || source ~/.swiftly/env.fish2. Select an Editor
Xcode
To develop with Swift for Apple platforms, download the latest version of Xcode, which is regularly refreshed with the latest Swift toolchain.
Visual Studio Code
Visual Studio Code is a cross-platform and extensible editor that supports Swift through the Swift extension, which provides intelligent editor functionality as well as debugging and test support.
Other editors
Any editor that supports the Language Server Protocol (LSP) can use SourceKit-LSP to provide intelligent editor functionality for Swift.
3. Build a Command-line Tool
Let’s write a small application with your new Swift development environment.
Create a directory:
mkdir MyCLIChange the directory:
cd MyCLICreate a new project:
swift package init --name MyCLI --type executableRun the program with
swift run MyCLIYou can continue to expand the program with additional features. Check out the getting started guide for command line tools.
Build a Command-line Tool Guide
Swift SDK Bundles
Additional components for cross-compilation
Swift SDK for Static Linux
Copy install command
Swift SDK for WebAssembly
Copy install command
Swift SDK for Android
Copy install command
Download SDK | Signature (PGP)
Alternative toolchain install options
Package Installer
The toolchain package installer (.pkg) that Swiftly automates is available as a stand-alone download.
Previous Releases
Release Date Toolchain Debugging Symbols Static SDK
Swift 6.3.1
April 16, 2026
Copy install command
Swift 6.3
March 24, 2026
Copy install command
Swift 6.2.4
February 26, 2026
Copy install command
Swift 6.2.3
December 12, 2025
Copy install command
Swift 6.2.2
December 8, 2025
Copy install command
Swift 6.2.1
November 3, 2025
Copy install command
Swift 6.2
September 15, 2025
Copy install command
Swift 6.1.3
September 5, 2025
Copy install command
Swift 6.1.2
May 28, 2025
Copy install command
Swift 6.1.1
May 23, 2025
Copy install command
Swift 6.1
March 31, 2025
Copy install command
Swift 6.0.3
December 11, 2024
Copy install command
Swift 6.0.2
October 28, 2024
Copy install command
Swift 6.0.1
September 24, 2024
Copy install command
Swift 6.0
September 16, 2024
Copy install command
Swift 5.10.1
June 5, 2024
Unavailable
Swift 5.10
March 5, 2024
Unavailable
Swift 5.9.2
December 11, 2023
Unavailable
Swift 5.9.1
October 19, 2023
Unavailable
Swift 5.9
September 18, 2023
Unavailable
Swift 5.8.1
June 1, 2023
Unavailable
Swift 5.8
March 30, 2023
Unavailable
Swift 5.7.3
January 18, 2023
Unavailable
Swift 5.7.2
December 13, 2022
Unavailable
Swift 5.7.1
November 1, 2022
Unavailable
Swift 5.7
September 12, 2022
Unavailable
Swift 5.6.3
September 2, 2022
Unavailable
Swift 5.6.2
June 15, 2022
Unavailable
Swift 5.6.1
April 8, 2022
Unavailable
Swift 5.6
March 14, 2022
Unavailable
Swift 5.5.3
February 9, 2022
Unavailable
Swift 5.5.2
December 13, 2021
Unavailable
Swift 5.5.1
October 25, 2021
Unavailable
Swift 5.5
September 20, 2021
Unavailable
Swift 5.4.3
September 9, 2021
Unavailable
Swift 5.4.2
June 28, 2021
Unavailable
Swift 5.4.1
May 25, 2021
Unavailable
Swift 5.4
April 26, 2021
Unavailable
Swift 5.3.3
December 14, 2020
Unavailable
Swift 5.3.2
December 14, 2020
Unavailable
Swift 5.3.1
November 12, 2020
Unavailable
Swift 5.3
September 16, 2020
Unavailable
Swift 5.2.5
August 4, 2020
Unavailable
Swift 5.2.4
May 20, 2020
Unavailable
Swift 5.2.3
April 29, 2020
Unavailable
Swift 5.2.2
April 15, 2020
Unavailable
Swift 5.2.1
March 30, 2020
Unavailable
Swift 5.2
March 24, 2020
Unavailable
Swift 5.1.5
March 9, 2020
Unavailable
Swift 5.1.4
January 31, 2020
Unavailable
Swift 5.1.3
December 13, 2019
Unavailable
Swift 5.1.2
November 7, 2019
Unavailable
Swift 5.1.1
October 11, 2019
Unavailable
Swift 5.1
September 19, 2019
Unavailable
Swift 5.0.3
August 30, 2019
Unavailable
Swift 5.0.2
July 15, 2019
Unavailable
Swift 5.0.1
April 18, 2019
Unavailable
Swift 5.0
March 25, 2019
Unavailable
Swift 4.2.4
March 29, 2019
Unavailable
Swift 4.2.3
February 28, 2019
Unavailable
Swift 4.2.2
February 4, 2019
Unavailable
Swift 4.2.1
October 30, 2018
Unavailable
Swift 4.2
September 17, 2018
Unavailable
Swift 4.1.3
July 27, 2018
Unavailable
Swift 4.1.2
May 31, 2018
Unavailable
Swift 4.1.1
May 4, 2018
Unavailable
Swift 4.1
March 29, 2018
Unavailable
Swift 4.0.3
December 5, 2017
Unavailable
Swift 4.0.2
November 1, 2017
Unavailable
Swift 4.0
September 19, 2017
Unavailable
Swift 3.1.1
April 21, 2017
Unavailable
Swift 3.1
March 27, 2017
Unavailable
Swift 3.0.2
December 13, 2016
Unavailable
Swift 3.0.1
October 28, 2016
Unavailable
Swift 3.0
September 13, 2016
Unavailable
Swift 2.2.1
May 3, 2016
Unavailable
Swift 2.2
March 21, 2016
Unavailable
Development Snapshots
Swift snapshots are prebuilt binaries that are automatically created from the branch. These snapshots are not official releases. They have gone through automated unit testing, but they have not gone through the full testing that is performed for official releases.
The easiest way to install development snapshots is with the Swiftly tool. Read more on the instructions page.
Swiftly
Swiftly supports installing development snapshot toolchains. For example, you can install the latest available snapshot for the next major release using the “main-snapshot” selector and prepare your code for when it arrives.
swiftly install main-snapshotswiftly install 6.4.x-snapshotToolchain
main
May 27, 2026
Toolchain package installer (.pkg)
release/6.4.x
June 8, 2026
Toolchain package installer (.pkg)
Previous Snapshots (main)
Download
Previous Snapshots (release/6.4.x)
Download
Swift SDK Bundles
Additional components for cross-compilation
Swift SDK for Static Linux
main
May 27, 2026
Copy install command
release/6.4.x
May 31, 2026
Copy install command
Swift SDK for WebAssembly
main
May 27, 2026
Copy install command
release/6.4.x
June 8, 2026
Copy install command
Swift SDK for Android
main
May 27, 2026
Copy install command
release/6.4.x
June 8, 2026
Copy install command