---
title: init()
framework: foundation
role: symbol
role_heading: Initializer
path: foundation/urlcomponents/init()
---

# init()

Creates a URL components instance without defining any of the components.

## Declaration

```swift
init()
```

## See Also

### Creating URL components

- [init(string:)](foundation/urlcomponents/init(string:).md)
- [init(string:encodingInvalidCharacters:)](foundation/urlcomponents/init(string:encodinginvalidcharacters:).md)
- [init(url:resolvingAgainstBaseURL:)](foundation/urlcomponents/init(url:resolvingagainstbaseurl:).md)
