Random city generator

Generate random cities for examples and test data.

Overview

Cities are arguably the most transformative invention in human history. The oldest known continuously inhabited one is Uruk, in present-day Iraq, occupied from around 4500 BC and reaching an estimated population of 50,000 to 80,000 people at its peak around 2900 BC — a metropolis by any standard of its era. The urbanization process has never stopped: in 2007, for the first time in recorded history, the global urban population surpassed the rural one, and a 2018 UN report estimated that 55% of humanity already lived in cities, with projections reaching 68% by 2050.

In software development, cities hide a level of technical complexity that the deceptively simple field name never suggests. Geocoding systems like Google Maps — launched in February 2005 with JavaScript code that exposed the entire API architecture on the front end — and OpenStreetMap, founded in 2004 as a collaborative open alternative, must handle cities whose names exist in dozens of countries (there are over 25 cities named San José in Latin America alone), anomalous time zones, non-universal postal code formats, and conflicting transliterations of names written in non-Latin scripts. Validating a city field sounds trivial until you discover that Beijing, Peking, and 北京 are the same city and your database recognizes only one spelling.

This tool generates random cities to populate address fields in form tests, create plausible fictional data for user profiles, stress-test layout components with real name-length variation, feed demos for delivery, map, or travel applications, and diversify geographic datasets for machine learning models. If you have ever needed any city other than London or New York to test an address autocomplete field, this generator is exactly what you were looking for.

Technical deep dive

Common questions summarized

  • What is this tool for?: It runs fully in your browser: useful to validate, format, or convert data in everyday development.
  • Are my inputs sent to a server?: Processing happens locally with JavaScript. We do not store what you paste into the text areas.
  • Can I use this for real production data?: Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.

Sample payload to try

  • See also the larger "Code Snippets" sample; paste this excerpt to try locally: Example — Lisbon

Tool guide

  • What random city output is A city name used as synthetic location data.

  • What the tool does Generates city names in batches from an internal set.

  • Why use it Test address UI and location-filter scenarios.

Code Snippets

Code example
Lisbon

Example

Lisbon

FAQ

What is this tool for?

It runs fully in your browser: useful to validate, format, or convert data in everyday development.

Are my inputs sent to a server?

Processing happens locally with JavaScript. We do not store what you paste into the text areas.

Can I use this for real production data?

Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.