Skip to content

Generators

location

Addresses, cities, subdivisions, postcodes, coordinates, countries.

var faker = Faker(seed: 1337, locale: DecoyLocaleEN.locale)
faker.location.buildingNumber()
Method Example output
buildingNumber() 16
2581
72
streetSuffix() Lock
Prairie
Fort
streetName() Rice Skyway
Jane Way
Donald Estate
streetAddress(full: Bool = false) 537 Richard Crest
21544 Budnick Expressway
47 Sara Green
secondaryAddress() Apt. 111
Flat 9
Apt. 631
city() Parklane
Choteau
Talladega
place() ["city": "Old Saybrook", "state": "Connecticut", "state_code": "CT"]
["city": "Washington Terrace", "state": "Utah", "state_code": "UT"]
["city": "Colonie", "state": "New York", "state_code": "NY"]
placeAndPostcode() (city: "First Mesa", state: "Arizona", stateCode: "AZ", postcode: "85537")
(city: "Richmond West", state: "Florida", stateCode: "FL", postcode: "34632")
(city: "Seneca", state: "Missouri", stateCode: "MO", postcode: "65088")
county() Leflore County
Saratoga County
Campbell County
stateRow() ["abbr": "IN", "name": "Indiana"]
["abbr": "AR", "name": "Arkansas"]
["abbr": "MD", "name": "Maryland"]
state() Michigan
Maine
South Dakota
stateAbbreviation() PA
ND
MA
country() Uzbekistan
Anguilla
Portugal
continent() Oceania
Africa
Europe
timeZone() Africa/Tripoli
Asia/Tehran
America/Hermosillo
postcode() 08122
47986
70561
postcode(state abbreviation: String?) 08122
47986
70561
stateAndPostcode() (state: "Oregon", abbr: "OR", postcode: "97689")
(state: "Illinois", abbr: "IL", postcode: "61925")
(state: "Wisconsin", abbr: "WI", postcode: "54802")
postalAddress() Annie Webb 532 Burns Rapid Olla Texas 91031
Paul Garcia 15 Haines Crest Fair Oaks Ranch Idaho 83874
Logan Ross 54670 Vanessa Lodge Westchase Colorado 97010
countryCode() ["alpha2": "CH", "alpha3": "CHE", "numeric": "756"]
["alpha2": "KG", "alpha3": "KGZ", "numeric": "417"]
["alpha2": "KZ", "alpha3": "KAZ", "numeric": "398"]
countryCodeAlpha2() LI
GQ
AZ
countryCodeAlpha3() SGS
DNK
ATA
language() ["alpha2": "es", "alpha3": "spa", "name": "Spanish"]
["alpha2": "bn", "alpha3": "ben", "name": "Bangla"]
["alpha2": "tk", "alpha3": "tuk", "name": "Turkmen"]
direction(abbreviated: Bool = false) North
Southeast
Northwest
cardinalDirection(abbreviated: Bool = false) North
South
East
ordinalDirection(abbreviated: Bool = false) Northeast
Southeast
Southwest
latitude() 40.244
29.6633
84.0251
longitude() 3.2718
128.548
-131.0444
coordinate(near origin: (latitude: Double, longitude: Double)? = nil, radiusKm: Double = 10) (latitude: 67.3302, longitude: 16.9603)
(latitude: 83.9858, longitude: -152.6476)
(latitude: -60.516, longitude: -85.948)

Examples are real output from three different seeds, captured when this page was built, using each method’s default arguments. Where a signature shows parameters, pass your own to change the size, gender, length or format.