Swift

Share Swift code online.

Share Swift structs, SwiftUI view code, or Combine pipelines: syntax-highlighted and shareable in seconds.

textdrop.sh/xk4mR2
1import Foundation23struct APIClient {4    let baseURL: URL5    let session: URLSession67    func fetch<T: Decodable>(8        _ path: String,9        as type: T.Type = T.self10    ) async throws -> T {11        let url = baseURL.appending(path: path)12        let (data, response) = try await session.data(from: url)1314        guard let http = response as? HTTPURLResponse,15              (200..<300).contains(http.statusCode)16        else { throw URLError(.badServerResponse) }1718        return try JSONDecoder().decode(T.self, from: data)19    }20}
Every paste includes

Swift syntax highlighting

Paste Swift code and get a shareable link with full syntax highlighting, server-side rendered with no JavaScript overhead.

Burn after read

Deleted on first open. Can't be viewed twice.

Password protection

Add a password for end-to-end encryption with no raw key stored.

Configurable expiry

Set pastes to expire after 1 hour, 1 day, 7 days, or up to 30 days. Gone when you say so.

No account needed

No sign-up, no email, no ads. Paste and share in seconds.

How it works
Plain Text
Markdown
Code
DB_HOST=db-01.prod.internal
DB_USER=api_svc
DB_PASS=xK9$mP2!qR7nLw2
REDIS_URL=redis://:abc@cache:6379
delete after setup — expires 1hr
7 days
Share
textdrop.sh/
7 days · plain text
Use cases
  • 01Share SwiftUI view implementations
  • 02Send Combine / async-await patterns
  • 03Share Codable struct definitions
  • 04Distribute iOS networking code
  • 05Send Swift macro implementations
FAQ
Does the Swift grammar support Swift 6 concurrency?+

Yes. async/await, actors, structured concurrency, and Sendable conformances are all supported.

Is there a size limit?+

Pastes up to 5 MB are supported.

Is my code encrypted?+

Yes. AES-256-GCM encryption runs in your browser before upload. Non-password pastes store the raw data key server-side for simple sharing and raw access; password-protected pastes keep the raw key out of the server.

Other languages
Drop your code