Swift, but on a server
Vapor provides a safe, performant and easy to use foundation to build HTTP servers, backends and APIs in Swift
import Vapor
let app = try await Application.make(.detect())
app.get("hello") { req in
"Hello, world!"
}
try await app.execute()
Build server side with the tooling you already understand
No need to learn a language from scratch (or assemble a different team) just for your backend. Vapor is built on Apple’s SwiftNIO so you’ll get to use the language you already know and love.
Vapor
Build efficient APIs in a language you love. Create routes, send and receive JSON and build HTTP servers.
Learn MoreFluent
Create models and interact with your database in native, safe Swift code without needing to write any SQL
Learn MoreLeaf
A templating engine written in Swift. Generate HTML for both web apps and emails with a simple syntax anyone can use
Learn MoreHigh-performant APIs and servers
Built with a non-blocking, event-driven architecture, Vapor allows you to build high-performant, scalable APIs and HTTP servers. Using Swift's Concurrency model, you can write clear, maintainable code that's efficient and easy to read.
app.get("todos", ":id") { req async throws -> Todo in
let id: UUID = try req.parameters.require("id")
guard
let todo = try await Todo.find(id, on: req.db)
else {
throw Abort(.notFound)
}
return todo
}
Ship with confidence, even on Fridays
With Vapor's expressive, protocol oriented design, you'll have peace of mind when shipping your code. With our strong type-safety focus, many errors and problems are caught early on by the compiler.
func search(req: Request) async throws -> [Todo] {
let name: String = try req.query.get(at: "name")
let results = try await Todo.query(on: req.db)
.filter(\.$number == name)
.all()
return results
}
Full integration with your entire stack
Vapor's mature ecosystem includes over a hundred official and community maintained server-first Swift packages to make building your applications easy and efficient.

Used by the teams behind these amazing apps

SwiftFiddle
SwiftFiddle is an online playground for creating, sharing and embedding Swift fiddles
See it in action
SwiftPackageIndex
The Swift Package Index is a searchable index of Swift packages and their compatibility with various platforms.
See it in action
Underway NYC
Quickly locate yourself on the official MTA map of NYC and get real-time train arrivals at that subway stop
See it in action
Litmaps
Litmaps is a browser-based research platform designed for clarity, comprehensiveness, and collaboration.
See it in action
Join the largest community of Swift backend developers
Vapor's 13k+ Discord community will be at your side to support you along the way. Ask questions, contribute and be a part of a thriving, wholesome corner of the internet.
ContributeGet all the tools you need to build with Swift
Go to API DocsGet all the tools you need to build with Swift
- Easily create new projects with the Vapor Toolbox
- Expansive documentation and API reference
- Everything you need to build backends and APIs
- Full support for Swift's concurrency model
Supported by our incredible sponsors and backers
Become a supporter
Emerge Tools
Emerge Tools is a suite of revolutionary products designed to supercharge mobile apps and the teams that build them.
Learn More