<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Random Name Generator Archives - Free Online Tools - Imediacto</title>
	<atom:link href="https://imediacto.com/tag/random-name-generator/feed/" rel="self" type="application/rss+xml" />
	<link>https://imediacto.com/tag/random-name-generator/</link>
	<description>Free Online Tool Set for Text and HTML</description>
	<lastBuildDate>Tue, 09 Jun 2026 09:43:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.1</generator>

<image>
	<url>https://imediacto.com/wp-content/uploads/2020/04/cropped-favicon-32x32.png</url>
	<title>Random Name Generator Archives - Free Online Tools - Imediacto</title>
	<link>https://imediacto.com/tag/random-name-generator/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Random Name Generator</title>
		<link>https://imediacto.com/tools/name-generators/random-name-generator/</link>
					<comments>https://imediacto.com/tools/name-generators/random-name-generator/#respond</comments>
		
		<dc:creator><![CDATA[Dante]]></dc:creator>
		<pubDate>Tue, 09 Jun 2026 09:43:01 +0000</pubDate>
				<category><![CDATA[Name Generators]]></category>
		<category><![CDATA[Random Name Generator]]></category>
		<guid isPermaLink="false">https://imediacto.com/?p=411</guid>

					<description><![CDATA[<p>Random Name Generator is a free online tool to generate realistic human names by country, gender, style, and name structure. Export as TXT, JSON, CSV, and HTML list.</p>
<p>The post <a href="https://imediacto.com/tools/name-generators/random-name-generator/">Random Name Generator</a> appeared first on <a href="https://imediacto.com">Free Online Tools - Imediacto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><div class="boot random-name-generator">
            <div class="row mb-3">
                <div class="col-sm-12">
                    <h2>Generate Realistic Names by Country</h2>
                    <p>
                        <strong>Random Name Generator</strong> is a clean and practical online tool to create realistic
                        names with country, gender, style, and structure filters. You can also add optional metadata
                        such as age, nationality, locality, and language, then export results as TXT, JSON, CSV, and
                        HTML lists.
                    </p>
                </div>
            </div>

            <div class="tool-panel">
                <h3 class="step-title">Step 1) Select one or more countries</h3>
                <p class="step-help">Use presets for faster selection, or click countries manually.</p>

                <div class="preset-row">
                    <button class="preset-btn" type="button" onclick="applyPreset('western')">Western preset</button>
                    <button class="preset-btn" type="button" onclick="applyPreset('latin')">Latin preset</button>
                    <button class="preset-btn" type="button" onclick="applyPreset('asian')">Asian preset</button>
                    <button class="preset-btn" type="button" onclick="applyPreset('nordic')">Nordic preset</button>
                    <button class="preset-btn" type="button" onclick="clearCountrySelection()">Clear countries</button>
                </div>

                <div id="countriesGrid" class="countries-grid"></div>
                <div id="selectedCount" class="counter">0 countries selected</div>
                <div id="validationMessage" class="error-inline none"></div>
            </div>

            <div class="tool-panel">
                <h3 class="step-title">Step 2) Configure generation</h3>
                <p class="step-help">Choose structure, gender, style and quantity. Defaults are optimized for fast use.</p>

                <div class="controls-grid">
                    <div>
                        <label for="nameStructure"><strong>Name structure</strong></label>
                        <div class="radio-group">
                            <label><input type="radio" name="nameStructure" value="firstOnly">First name only</label>
                            <label><input type="radio" name="nameStructure" value="firstOne" checked>First + 1 surname</label>
                            <label><input type="radio" name="nameStructure" value="firstTwo">First + 2 surnames</label>
                            <label><input type="radio" name="nameStructure" value="firstFour">First + 4 surnames</label>
                        </div>
                    </div>

                    <div>
                        <label for="gender"><strong>Gender</strong></label>
                        <div class="radio-group">
                            <label><input type="radio" name="gender" value="male">Male</label>
                            <label><input type="radio" name="gender" value="female">Female</label>
                            <label><input type="radio" name="gender" value="both" checked>Both</label>
                            <label><input type="checkbox" id="includeUnisex">Include ambiguous names</label>
                        </div>
                    </div>

                    <div>
                        <label for="nameStyle"><strong>Name style</strong></label>
                        <div class="radio-group">
                            <label><input type="radio" name="nameStyle" value="modern">Modern</label>
                            <label><input type="radio" name="nameStyle" value="classic">Classic</label>
                            <label><input type="radio" name="nameStyle" value="traditional">Traditional</label>
                            <label><input type="radio" name="nameStyle" value="mixed" checked>Mixed</label>
                        </div>
                    </div>

                    <div>
                        <label for="quantity"><strong>Names quantity</strong></label>
                        <input type="number" id="quantity" min="1" max="100" value="20">
                        <p class="step-help">Min 1, max 100. For multiple countries, total is distributed automatically.</p>
                    </div>
                </div>
            </div>

            <div class="tool-panel">
                <h3 class="step-title">Step 3) Select extra output fields (optional)</h3>
                <p class="step-help">These fields appear in results and are included in JSON, CSV, and HTML exports.</p>

                <div class="radio-group">
                    <label class="extra-field"><input type="checkbox" class="extra-checkbox" value="age">Age</label>
                    <label class="extra-field"><input type="checkbox" class="extra-checkbox" value="sex">Sex</label>
                    <label class="extra-field"><input type="checkbox" class="extra-checkbox" value="country">Country</label>
                    <label class="extra-field"><input type="checkbox" class="extra-checkbox" value="nationality">Nationality</label>
                    <label class="extra-field"><input type="checkbox" class="extra-checkbox" value="locality">Locality</label>
                    <label class="extra-field"><input type="checkbox" class="extra-checkbox" value="language">Language</label>
                    <label class="extra-field"><input type="checkbox" class="extra-checkbox" value="popularity">Popularity</label>
                </div>

                <div class="actions">
                    <button id="generateButton" class="btn btn-success" onclick="generateNames()"><i class="fa fa-magic"></i> Generate names</button>
                    <button class="btn btn-light" onclick="clearResults()"><i class="fa fa-eraser"></i> Clear output</button>
                </div>

                <div id="emptyState" class="empty-state">
                    Select at least one country, keep default options if you want, and click Generate names.
                </div>

                <div id="summary" class="summary none"></div>
                <div id="stats" class="stats none"></div>

                <div id="resultTools" class="result-tools none">
                    <button class="soft" onclick="copyToClipboard('plainOutput', 'checkCopy')" title="Copy output to clipboard"><i class="fa fa-copy"></i> Copy</button>
                    <button class="soft" onclick="downloadTxt()" title="Download TXT"><i class="fa fa-download"></i> TXT</button>
                    <button class="soft" onclick="downloadJson()" title="Download JSON"><i class="fa fa-download"></i> JSON</button>
                    <button class="soft" onclick="downloadCsv()" title="Download CSV"><i class="fa fa-download"></i> CSV</button>
                    <button class="soft" onclick="downloadHtmlList('ol')" title="Download ordered HTML list"><i class="fa fa-download"></i> HTML OL</button>
                    <button class="soft" onclick="downloadHtmlList('ul')" title="Download unordered HTML list"><i class="fa fa-download"></i> HTML UL</button>
                    <div id="checkCopy" class="check none"></div>
                </div>

                <div id="resultsCards" class="results-cards"></div>
                <ol id="resultsList" class="results-list none"></ol>
                <div id="plainOutput" class="none"></div>
            </div>

            <hr>

            <div class="more-notes entry-content">
                <h2>What is a Random Name Generator?</h2>
                <p>
                    A random name generator creates realistic person names for scripts, books, NPC creation, test data,
                    game rosters, and creative brainstorming. This tool focuses on country-aware naming structures.
                </p>

                <h2>Why country-based names improve realism</h2>
                <p>
                    Names from different countries follow different first-name and surname patterns. Choosing country,
                    style, and structure helps generate names that feel more authentic to a region and language.
                </p>

                <h2>How the style filter works</h2>
                <p>
                    Use <strong>modern</strong> for contemporary names, <strong>classic</strong> for historically common
                    names, and <strong>traditional</strong> for names with stronger cultural roots. Mixed combines all styles.
                </p>

                <h2>Top 20 names by country</h2>
                <h3>USA</h3>
                <p>James, Michael, William, Alexander, Benjamin, Emma, Olivia, Sophia, Charlotte, Amelia, Mason, Ethan, Harper, Evelyn, Lucas, Henry, Scarlett, Zoe, Jack, Ella.</p>
                <h3>UK</h3>
                <p>Oliver, George, Arthur, Harry, Leo, Jack, Amelia, Isla, Florence, Freya, Noah, Oscar, Archie, Ava, Ivy, Elsie, Theo, Lily, Alfie, Grace.</p>
                <h3>Spain</h3>
                <p>Alejandro, Mateo, Hugo, Daniel, Pablo, Lucia, Sofia, Martina, Carmen, Alba, Javier, Miguel, Laura, Maria, Elena, Diego, Adriana, Raul, Ines, Clara.</p>
                <h3>France</h3>
                <p>Louis, Gabriel, Jules, Arthur, Hugo, Emma, Louise, Chloe, Lea, Camille, Antoine, Paul, Sarah, Claire, Elise, Theo, Lucas, Manon, Zoe, Jeanne.</p>
                <h3>Germany</h3>
                <p>Lukas, Leon, Felix, Jonas, Max, Mia, Emma, Hannah, Lina, Sofia, Finn, Noah, Anna, Lara, Johanna, Elias, Paul, Marie, Greta, Klara.</p>
                <h3>Brazil</h3>
                <p>Joao, Pedro, Gabriel, Lucas, Mateus, Maria, Ana, Julia, Beatriz, Isabela, Rafael, Felipe, Carolina, Fernanda, Luiza, Gustavo, Thiago, Larissa, Camila, Leticia.</p>

                <h2>Frequently Asked Questions (FAQ)</h2>
                <h3>Can I use generated names in commercial projects?</h3>
                <p>Yes. You can use generated results for scripts, game prototypes, stories, and similar creative work.</p>

                <h3>How does unisex mode work?</h3>
                <p>When the ambiguous checkbox is enabled, the generator includes names commonly used across more than one gender.</p>

                <h3>Why are there multiple surname options?</h3>
                <p>Different regions use one or more surnames. This option helps adapt name output to different conventions.</p>
            </div>

            <div class="notes">
                <div class="image"></div>
                <div class="message">
                    <p>
                        Send me your feedback about this <strong>Random Name Generator</strong> and tell me if you need
                        additional countries, better locality mappings, or more export options, so I can improve this tool.
                    </p>
                    <p>
                        You can contribute with fixes and improvements on Github:
                        <a href="https://github.com/dantovsky/Imediacto-Online-Tool-Set/tree/master/tools/013-random-name-generator" target="_blank">Github >> Random Name Generator</a>.
                        Pull requests are welcome.
                    </p>
                </div>
            </div>
        </div>

        <script>
            const COUNTRY_KEYS = [
                'USA', 'UK', 'Spain', 'France', 'Germany', 'Italy', 'Brazil', 'Japan', 'India', 'Russia', 'Sweden', 'Netherlands'
            ];

            const PRESETS = {
                western: ['USA', 'UK', 'France', 'Germany', 'Netherlands'],
                latin: ['Spain', 'Italy', 'Brazil'],
                asian: ['Japan', 'India'],
                nordic: ['Sweden', 'Russia']
            };

            const selectedCountries = new Set();
            let generatedRecords = [];

            const COUNTRY_BANK = {
                USA: {
                    nationality: 'American',
                    languages: ['English'],
                    localities: ['New York', 'Los Angeles', 'Chicago', 'Austin', 'Seattle', 'Boston'],
                    male: [
                        { name: 'James', style: 'classic', popularity: 'common' },
                        { name: 'Michael', style: 'classic', popularity: 'common' },
                        { name: 'Noah', style: 'modern', popularity: 'common' },
                        { name: 'Logan', style: 'modern', popularity: 'common' },
                        { name: 'Theodore', style: 'traditional', popularity: 'rare' },
                        { name: 'Ethan', style: 'modern', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Emma', style: 'classic', popularity: 'common' },
                        { name: 'Olivia', style: 'modern', popularity: 'common' },
                        { name: 'Amelia', style: 'classic', popularity: 'common' },
                        { name: 'Charlotte', style: 'traditional', popularity: 'rare' },
                        { name: 'Harper', style: 'modern', popularity: 'common' },
                        { name: 'Evelyn', style: 'classic', popularity: 'common' }
                    ],
                    unisex: [
                        { name: 'Noa', style: 'modern', popularity: 'common' },
                        { name: 'Taylor', style: 'classic', popularity: 'common' },
                        { name: 'Jordan', style: 'classic', popularity: 'common' }
                    ],
                    surnames: ['Smith', 'Johnson', 'Brown', 'Miller', 'Davis', 'Anderson', 'Moore', 'Clark']
                },
                UK: {
                    nationality: 'British',
                    languages: ['English'],
                    localities: ['London', 'Manchester', 'Liverpool', 'Bristol', 'Leeds', 'Oxford'],
                    male: [
                        { name: 'Oliver', style: 'modern', popularity: 'common' },
                        { name: 'George', style: 'classic', popularity: 'common' },
                        { name: 'Arthur', style: 'traditional', popularity: 'rare' },
                        { name: 'Harry', style: 'classic', popularity: 'common' },
                        { name: 'Leo', style: 'modern', popularity: 'common' },
                        { name: 'Alfie', style: 'traditional', popularity: 'rare' }
                    ],
                    female: [
                        { name: 'Isla', style: 'modern', popularity: 'common' },
                        { name: 'Freya', style: 'traditional', popularity: 'rare' },
                        { name: 'Amelia', style: 'classic', popularity: 'common' },
                        { name: 'Ivy', style: 'modern', popularity: 'common' },
                        { name: 'Grace', style: 'classic', popularity: 'common' },
                        { name: 'Florence', style: 'traditional', popularity: 'rare' }
                    ],
                    unisex: [
                        { name: 'Morgan', style: 'classic', popularity: 'common' },
                        { name: 'Alex', style: 'modern', popularity: 'common' },
                        { name: 'Riley', style: 'modern', popularity: 'rare' }
                    ],
                    surnames: ['Smith', 'Taylor', 'Walker', 'Wright', 'Turner', 'Carter', 'Evans', 'Foster']
                },
                Spain: {
                    nationality: 'Spanish',
                    languages: ['Spanish'],
                    localities: ['Madrid', 'Barcelona', 'Valencia', 'Seville', 'Bilbao', 'Granada'],
                    male: [
                        { name: 'Alejandro', style: 'classic', popularity: 'common' },
                        { name: 'Mateo', style: 'modern', popularity: 'common' },
                        { name: 'Hugo', style: 'modern', popularity: 'common' },
                        { name: 'Javier', style: 'traditional', popularity: 'rare' },
                        { name: 'Pablo', style: 'classic', popularity: 'common' },
                        { name: 'Miguel', style: 'traditional', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Lucia', style: 'modern', popularity: 'common' },
                        { name: 'Sofia', style: 'modern', popularity: 'common' },
                        { name: 'Martina', style: 'classic', popularity: 'common' },
                        { name: 'Carmen', style: 'traditional', popularity: 'rare' },
                        { name: 'Alba', style: 'modern', popularity: 'common' },
                        { name: 'Elena', style: 'classic', popularity: 'common' }
                    ],
                    unisex: [
                        { name: 'Noa', style: 'modern', popularity: 'common' },
                        { name: 'Alexis', style: 'classic', popularity: 'rare' },
                        { name: 'Andrea', style: 'classic', popularity: 'common' }
                    ],
                    surnames: ['Garcia', 'Lopez', 'Martinez', 'Sanchez', 'Perez', 'Gomez', 'Ruiz', 'Hernandez']
                },
                France: {
                    nationality: 'French',
                    languages: ['French'],
                    localities: ['Paris', 'Lyon', 'Marseille', 'Toulouse', 'Nice', 'Bordeaux'],
                    male: [
                        { name: 'Louis', style: 'classic', popularity: 'common' },
                        { name: 'Gabriel', style: 'modern', popularity: 'common' },
                        { name: 'Jules', style: 'traditional', popularity: 'rare' },
                        { name: 'Hugo', style: 'modern', popularity: 'common' },
                        { name: 'Theo', style: 'modern', popularity: 'common' },
                        { name: 'Paul', style: 'classic', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Emma', style: 'modern', popularity: 'common' },
                        { name: 'Louise', style: 'traditional', popularity: 'rare' },
                        { name: 'Chloe', style: 'classic', popularity: 'common' },
                        { name: 'Lea', style: 'modern', popularity: 'common' },
                        { name: 'Camille', style: 'classic', popularity: 'common' },
                        { name: 'Jeanne', style: 'traditional', popularity: 'rare' }
                    ],
                    unisex: [
                        { name: 'Sasha', style: 'modern', popularity: 'rare' },
                        { name: 'Claude', style: 'traditional', popularity: 'rare' },
                        { name: 'Noel', style: 'classic', popularity: 'rare' }
                    ],
                    surnames: ['Martin', 'Bernard', 'Dubois', 'Thomas', 'Robert', 'Richard', 'Petit', 'Moreau']
                },
                Germany: {
                    nationality: 'German',
                    languages: ['German'],
                    localities: ['Berlin', 'Munich', 'Hamburg', 'Cologne', 'Frankfurt', 'Stuttgart'],
                    male: [
                        { name: 'Lukas', style: 'modern', popularity: 'common' },
                        { name: 'Leon', style: 'modern', popularity: 'common' },
                        { name: 'Felix', style: 'classic', popularity: 'common' },
                        { name: 'Jonas', style: 'classic', popularity: 'common' },
                        { name: 'Maximilian', style: 'traditional', popularity: 'rare' },
                        { name: 'Finn', style: 'modern', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Mia', style: 'modern', popularity: 'common' },
                        { name: 'Hannah', style: 'classic', popularity: 'common' },
                        { name: 'Sofia', style: 'modern', popularity: 'common' },
                        { name: 'Lina', style: 'modern', popularity: 'common' },
                        { name: 'Johanna', style: 'traditional', popularity: 'rare' },
                        { name: 'Klara', style: 'traditional', popularity: 'rare' }
                    ],
                    unisex: [
                        { name: 'Nico', style: 'modern', popularity: 'common' },
                        { name: 'Luca', style: 'modern', popularity: 'common' },
                        { name: 'Robin', style: 'classic', popularity: 'common' }
                    ],
                    surnames: ['Muller', 'Schmidt', 'Schneider', 'Fischer', 'Weber', 'Meyer', 'Wagner', 'Becker']
                },
                Italy: {
                    nationality: 'Italian',
                    languages: ['Italian'],
                    localities: ['Rome', 'Milan', 'Naples', 'Turin', 'Florence', 'Bologna'],
                    male: [
                        { name: 'Luca', style: 'modern', popularity: 'common' },
                        { name: 'Leonardo', style: 'classic', popularity: 'common' },
                        { name: 'Matteo', style: 'modern', popularity: 'common' },
                        { name: 'Giovanni', style: 'traditional', popularity: 'rare' },
                        { name: 'Alessandro', style: 'classic', popularity: 'common' },
                        { name: 'Marco', style: 'classic', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Giulia', style: 'modern', popularity: 'common' },
                        { name: 'Sofia', style: 'modern', popularity: 'common' },
                        { name: 'Francesca', style: 'classic', popularity: 'common' },
                        { name: 'Chiara', style: 'classic', popularity: 'common' },
                        { name: 'Beatrice', style: 'traditional', popularity: 'rare' },
                        { name: 'Elena', style: 'classic', popularity: 'common' }
                    ],
                    unisex: [
                        { name: 'Andrea', style: 'classic', popularity: 'common' },
                        { name: 'Gabriele', style: 'modern', popularity: 'rare' },
                        { name: 'Lorenza', style: 'traditional', popularity: 'rare' }
                    ],
                    surnames: ['Rossi', 'Russo', 'Ferrari', 'Esposito', 'Bianchi', 'Romano', 'Gallo', 'Costa']
                },
                Brazil: {
                    nationality: 'Brazilian',
                    languages: ['Portuguese'],
                    localities: ['Sao Paulo', 'Rio de Janeiro', 'Belo Horizonte', 'Curitiba', 'Salvador', 'Recife'],
                    male: [
                        { name: 'Joao', style: 'traditional', popularity: 'common' },
                        { name: 'Pedro', style: 'classic', popularity: 'common' },
                        { name: 'Gabriel', style: 'modern', popularity: 'common' },
                        { name: 'Lucas', style: 'modern', popularity: 'common' },
                        { name: 'Rafael', style: 'classic', popularity: 'common' },
                        { name: 'Thiago', style: 'traditional', popularity: 'rare' }
                    ],
                    female: [
                        { name: 'Maria', style: 'traditional', popularity: 'common' },
                        { name: 'Ana', style: 'classic', popularity: 'common' },
                        { name: 'Julia', style: 'modern', popularity: 'common' },
                        { name: 'Beatriz', style: 'classic', popularity: 'common' },
                        { name: 'Isabela', style: 'modern', popularity: 'common' },
                        { name: 'Luiza', style: 'modern', popularity: 'common' }
                    ],
                    unisex: [
                        { name: 'Noa', style: 'modern', popularity: 'rare' },
                        { name: 'Alex', style: 'modern', popularity: 'common' },
                        { name: 'Ariel', style: 'classic', popularity: 'rare' }
                    ],
                    surnames: ['Silva', 'Santos', 'Oliveira', 'Souza', 'Lima', 'Costa', 'Pereira', 'Almeida']
                },
                Japan: {
                    nationality: 'Japanese',
                    languages: ['Japanese'],
                    localities: ['Tokyo', 'Osaka', 'Kyoto', 'Sapporo', 'Fukuoka', 'Yokohama'],
                    male: [
                        { name: 'Haruto', style: 'modern', popularity: 'common' },
                        { name: 'Ren', style: 'modern', popularity: 'common' },
                        { name: 'Yuto', style: 'modern', popularity: 'common' },
                        { name: 'Takumi', style: 'classic', popularity: 'common' },
                        { name: 'Daiki', style: 'traditional', popularity: 'rare' },
                        { name: 'Kenta', style: 'classic', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Yui', style: 'modern', popularity: 'common' },
                        { name: 'Aoi', style: 'modern', popularity: 'common' },
                        { name: 'Sakura', style: 'traditional', popularity: 'common' },
                        { name: 'Hina', style: 'modern', popularity: 'common' },
                        { name: 'Mio', style: 'classic', popularity: 'common' },
                        { name: 'Akari', style: 'modern', popularity: 'common' }
                    ],
                    unisex: [
                        { name: 'Haru', style: 'modern', popularity: 'common' },
                        { name: 'Rei', style: 'classic', popularity: 'common' },
                        { name: 'Kaoru', style: 'traditional', popularity: 'rare' }
                    ],
                    surnames: ['Sato', 'Suzuki', 'Takahashi', 'Tanaka', 'Watanabe', 'Ito', 'Yamamoto', 'Nakamura']
                },
                India: {
                    nationality: 'Indian',
                    languages: ['Hindi', 'English'],
                    localities: ['Mumbai', 'Delhi', 'Bangalore', 'Hyderabad', 'Pune', 'Chennai'],
                    male: [
                        { name: 'Aarav', style: 'modern', popularity: 'common' },
                        { name: 'Vihaan', style: 'modern', popularity: 'common' },
                        { name: 'Arjun', style: 'classic', popularity: 'common' },
                        { name: 'Rahul', style: 'classic', popularity: 'common' },
                        { name: 'Siddharth', style: 'traditional', popularity: 'rare' },
                        { name: 'Karan', style: 'modern', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Anaya', style: 'modern', popularity: 'common' },
                        { name: 'Diya', style: 'modern', popularity: 'common' },
                        { name: 'Priya', style: 'classic', popularity: 'common' },
                        { name: 'Aisha', style: 'classic', popularity: 'common' },
                        { name: 'Meera', style: 'traditional', popularity: 'rare' },
                        { name: 'Kavya', style: 'modern', popularity: 'common' }
                    ],
                    unisex: [
                        { name: 'Aadi', style: 'modern', popularity: 'rare' },
                        { name: 'Sam', style: 'modern', popularity: 'common' },
                        { name: 'Krishna', style: 'traditional', popularity: 'rare' }
                    ],
                    surnames: ['Sharma', 'Patel', 'Singh', 'Gupta', 'Kumar', 'Verma', 'Reddy', 'Nair']
                },
                Russia: {
                    nationality: 'Russian',
                    languages: ['Russian'],
                    localities: ['Moscow', 'Saint Petersburg', 'Kazan', 'Novosibirsk', 'Sochi', 'Samara'],
                    male: [
                        { name: 'Ivan', style: 'traditional', popularity: 'common' },
                        { name: 'Nikolai', style: 'classic', popularity: 'common' },
                        { name: 'Dmitri', style: 'classic', popularity: 'common' },
                        { name: 'Alexei', style: 'classic', popularity: 'common' },
                        { name: 'Mikhail', style: 'traditional', popularity: 'common' },
                        { name: 'Artem', style: 'modern', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Anna', style: 'classic', popularity: 'common' },
                        { name: 'Sofia', style: 'modern', popularity: 'common' },
                        { name: 'Elena', style: 'classic', popularity: 'common' },
                        { name: 'Irina', style: 'traditional', popularity: 'rare' },
                        { name: 'Ksenia', style: 'modern', popularity: 'rare' },
                        { name: 'Maria', style: 'classic', popularity: 'common' }
                    ],
                    unisex: [
                        { name: 'Sasha', style: 'classic', popularity: 'common' },
                        { name: 'Zhenya', style: 'traditional', popularity: 'rare' },
                        { name: 'Nikita', style: 'traditional', popularity: 'common' }
                    ],
                    surnames: ['Ivanov', 'Smirnov', 'Kuznetsov', 'Popov', 'Sokolov', 'Lebedev', 'Morozov', 'Volkov']
                },
                Sweden: {
                    nationality: 'Swedish',
                    languages: ['Swedish'],
                    localities: ['Stockholm', 'Gothenburg', 'Malmo', 'Uppsala', 'Lund', 'Vasteras'],
                    male: [
                        { name: 'Liam', style: 'modern', popularity: 'common' },
                        { name: 'Noah', style: 'modern', popularity: 'common' },
                        { name: 'Erik', style: 'traditional', popularity: 'common' },
                        { name: 'Oscar', style: 'classic', popularity: 'common' },
                        { name: 'Axel', style: 'traditional', popularity: 'rare' },
                        { name: 'Elias', style: 'modern', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Alice', style: 'classic', popularity: 'common' },
                        { name: 'Maja', style: 'modern', popularity: 'common' },
                        { name: 'Elsa', style: 'traditional', popularity: 'rare' },
                        { name: 'Linn', style: 'classic', popularity: 'rare' },
                        { name: 'Freja', style: 'traditional', popularity: 'common' },
                        { name: 'Nora', style: 'modern', popularity: 'common' }
                    ],
                    unisex: [
                        { name: 'Kim', style: 'classic', popularity: 'common' },
                        { name: 'Robin', style: 'modern', popularity: 'common' },
                        { name: 'Alex', style: 'modern', popularity: 'common' }
                    ],
                    surnames: ['Andersson', 'Johansson', 'Karlsson', 'Nilsson', 'Eriksson', 'Larsson', 'Olsson', 'Persson']
                },
                Netherlands: {
                    nationality: 'Dutch',
                    languages: ['Dutch', 'English'],
                    localities: ['Amsterdam', 'Rotterdam', 'Utrecht', 'Eindhoven', 'The Hague', 'Groningen'],
                    male: [
                        { name: 'Daan', style: 'modern', popularity: 'common' },
                        { name: 'Lucas', style: 'modern', popularity: 'common' },
                        { name: 'Milan', style: 'modern', popularity: 'common' },
                        { name: 'Pieter', style: 'traditional', popularity: 'rare' },
                        { name: 'Jasper', style: 'classic', popularity: 'common' },
                        { name: 'Bram', style: 'traditional', popularity: 'common' }
                    ],
                    female: [
                        { name: 'Emma', style: 'modern', popularity: 'common' },
                        { name: 'Julia', style: 'classic', popularity: 'common' },
                        { name: 'Sophie', style: 'modern', popularity: 'common' },
                        { name: 'Lotte', style: 'traditional', popularity: 'rare' },
                        { name: 'Mila', style: 'modern', popularity: 'common' },
                        { name: 'Eva', style: 'classic', popularity: 'common' }
                    ],
                    unisex: [
                        { name: 'Sam', style: 'modern', popularity: 'common' },
                        { name: 'Noa', style: 'modern', popularity: 'common' },
                        { name: 'Robin', style: 'classic', popularity: 'common' }
                    ],
                    surnames: ['De Jong', 'Jansen', 'De Vries', 'Van den Berg', 'Van Dijk', 'Bakker', 'Janssen', 'Visser']
                }
            };

            function createCountryPills() {
                const grid = document.getElementById('countriesGrid');
                grid.innerHTML = '';
                COUNTRY_KEYS.forEach((country) => {
                    const button = document.createElement('button');
                    button.type = 'button';
                    button.className = 'country-pill';
                    button.textContent = country;
                    button.setAttribute('data-country', country);
                    button.addEventListener('click', function () {
                        toggleCountry(country, button);
                    });
                    grid.appendChild(button);
                });
            }

            function toggleCountry(country, button) {
                if (selectedCountries.has(country)) {
                    selectedCountries.delete(country);
                    button.classList.remove('active');
                } else {
                    selectedCountries.add(country);
                    button.classList.add('active');
                }
                syncCountryCount();
            }

            function syncCountryCount() {
                const count = selectedCountries.size;
                document.getElementById('selectedCount').textContent = count + (count === 1 ? ' country selected' : ' countries selected');
                document.getElementById('validationMessage').classList.add('none');
                document.getElementById('validationMessage').textContent = '';
            }

            function applyPreset(type) {
                clearCountrySelection(true);
                PRESETS[type].forEach((country) => {
                    selectedCountries.add(country);
                    const button = document.querySelector('[data-country="' + country + '"]');
                    if (button) {
                        button.classList.add('active');
                    }
                });
                syncCountryCount();
            }

            function clearCountrySelection(skipSync) {
                selectedCountries.clear();
                document.querySelectorAll('.country-pill.active').forEach((el) => el.classList.remove('active'));
                if (!skipSync) {
                    syncCountryCount();
                }
            }

            function pickRandom(arr) {
                return arr[Math.floor(Math.random() * arr.length)];
            }

            function sanitizeQuantity() {
                const input = document.getElementById('quantity');
                let value = parseInt(input.value, 10);
                if (isNaN(value)) {
                    value = 20;
                }
                if (value < 1) {
                    value = 1;
                }
                if (value > 100) {
                    value = 100;
                }
                input.value = value;
                return value;
            }

            function getSelectedValue(name, fallback) {
                const selected = document.querySelector('input[name="' + name + '"]:checked');
                return selected ? selected.value : fallback;
            }

            function getSelectedExtras() {
                const extras = [];
                document.querySelectorAll('.extra-checkbox:checked').forEach((box) => extras.push(box.value));
                return extras;
            }

            function poolByGender(countryData, gender, includeUnisex, style) {
                let pool = [];

                if (gender === 'male') {
                    pool = pool.concat(countryData.male.map((i) => ({
                        name: i.name,
                        style: i.style,
                        popularity: i.popularity,
                        sex: 'male'
                    })));
                } else if (gender === 'female') {
                    pool = pool.concat(countryData.female.map((i) => ({
                        name: i.name,
                        style: i.style,
                        popularity: i.popularity,
                        sex: 'female'
                    })));
                } else {
                    pool = pool
                        .concat(countryData.male.map((i) => ({ name: i.name, style: i.style, popularity: i.popularity, sex: 'male' })))
                        .concat(countryData.female.map((i) => ({ name: i.name, style: i.style, popularity: i.popularity, sex: 'female' })));
                }

                if (includeUnisex) {
                    pool = pool.concat(countryData.unisex.map((i) => ({
                        name: i.name,
                        style: i.style,
                        popularity: i.popularity,
                        sex: 'unisex'
                    })));
                }

                if (style !== 'mixed') {
                    pool = pool.filter((item) => item.style === style);
                }

                if (!pool.length) {
                    pool = countryData.male
                        .concat(countryData.female)
                        .concat(includeUnisex ? countryData.unisex : [])
                        .map((i) => ({ name: i.name, style: i.style, popularity: i.popularity, sex: 'unisex' }));
                }

                return pool;
            }

            function surnameCountByStructure(structure) {
                if (structure === 'firstOnly') {
                    return 0;
                }
                if (structure === 'firstTwo') {
                    return 2;
                }
                if (structure === 'firstFour') {
                    return 4;
                }
                return 1;
            }

            function pickSurnames(surnames, count) {
                if (count === 0) {
                    return [];
                }
                const local = [];
                let attempts = 0;
                while (local.length < count && attempts < 40) {
                    attempts++;
                    const s = pickRandom(surnames);
                    if (!local.includes(s)) {
                        local.push(s);
                    }
                }
                while (local.length < count) {
                    local.push(pickRandom(surnames));
                }
                return local;
            }

            function distribute(total, countries) {
                const base = Math.floor(total / countries.length);
                const rem = total % countries.length;
                const map = {};
                countries.forEach((country, index) => {
                    map[country] = base + (index < rem ? 1 : 0);
                });
                return map;
            }

            function buildRecord(country, config) {
                const data = COUNTRY_BANK[country];
                const firstPool = poolByGender(data, config.gender, config.includeUnisex, config.style);
                const first = pickRandom(firstPool);
                const surnameCount = surnameCountByStructure(config.structure);
                const surnames = pickSurnames(data.surnames, surnameCount);

                const fullName = [first.name].concat(surnames).join(' ');

                const record = {
                    fullName: fullName,
                    firstName: first.name,
                    surnames: surnames,
                    country: country,
                    style: first.style,
                    sex: first.sex,
                    popularity: first.popularity
                };

                if (config.extras.includes('age')) {
                    record.age = Math.floor(Math.random() * 63) + 18;
                }
                if (config.extras.includes('sex')) {
                    record.outputSex = first.sex;
                }
                if (config.extras.includes('nationality')) {
                    record.nationality = data.nationality;
                }
                if (config.extras.includes('locality')) {
                    record.locality = pickRandom(data.localities);
                }
                if (config.extras.includes('language')) {
                    record.language = data.languages[0];
                }
                if (config.extras.includes('popularity')) {
                    record.outputPopularity = first.popularity;
                }

                return record;
            }

            function buildRecordViewText(record, extras) {
                const mainText = extras.includes('country')
                    ? record.fullName + ' (' + record.country + ')'
                    : record.fullName;
                const parts = [mainText];

                if (extras.includes('sex')) {
                    parts.push('sex: ' + record.outputSex);
                }
                if (extras.includes('age')) {
                    parts.push('age: ' + record.age);
                }
                if (extras.includes('nationality')) {
                    parts.push('nationality: ' + record.nationality);
                }
                if (extras.includes('locality')) {
                    parts.push('locality: ' + record.locality);
                }
                if (extras.includes('language')) {
                    parts.push('language: ' + record.language);
                }
                if (extras.includes('popularity')) {
                    parts.push('popularity: ' + record.outputPopularity);
                }

                return parts.join(' | ');
            }

            function buildMainDisplayText(record, extras) {
                return extras.includes('country')
                    ? record.fullName + ' (' + record.country + ')'
                    : record.fullName;
            }

            function buildExtrasOnlyText(record, extras) {
                const parts = [];

                if (extras.includes('sex')) {
                    parts.push('sex: ' + record.outputSex);
                }
                if (extras.includes('age')) {
                    parts.push('age: ' + record.age);
                }
                if (extras.includes('nationality')) {
                    parts.push('nationality: ' + record.nationality);
                }
                if (extras.includes('locality')) {
                    parts.push('locality: ' + record.locality);
                }
                if (extras.includes('language')) {
                    parts.push('language: ' + record.language);
                }
                if (extras.includes('popularity')) {
                    parts.push('popularity: ' + record.outputPopularity);
                }

                return parts.join(' | ');
            }

            function generateNames() {
                const quantity = sanitizeQuantity();
                const countries = Array.from(selectedCountries);
                const style = getSelectedValue('nameStyle', 'mixed');
                const structure = getSelectedValue('nameStructure', 'firstOne');
                const gender = getSelectedValue('gender', 'both');
                const includeUnisex = document.getElementById('includeUnisex').checked;
                const extras = getSelectedExtras();

                const validation = document.getElementById('validationMessage');
                if (!countries.length) {
                    validation.classList.remove('none');
                    validation.textContent = 'Please select at least one country.';
                    return;
                }

                const distribution = distribute(quantity, countries);
                const globalUsed = new Set();
                const result = [];
                const stats = {};

                countries.forEach((country) => {
                    const need = distribution[country];
                    stats[country] = 0;
                    const localUsed = new Set();
                    let attempts = 0;
                    const maxAttempts = Math.max(need * 60, 80);

                    while (stats[country] < need && attempts < maxAttempts) {
                        attempts++;
                        const record = buildRecord(country, {
                            style: style,
                            structure: structure,
                            gender: gender,
                            includeUnisex: includeUnisex,
                            extras: extras
                        });

                        if (!localUsed.has(record.fullName) && !globalUsed.has(record.fullName)) {
                            localUsed.add(record.fullName);
                            globalUsed.add(record.fullName);
                            result.push(record);
                            stats[country]++;
                        }
                    }

                    let fallback = 1;
                    while (stats[country] < need) {
                        const record = buildRecord(country, {
                            style: style,
                            structure: structure,
                            gender: gender,
                            includeUnisex: includeUnisex,
                            extras: extras
                        });

                        const forced = record.fullName + ' ' + fallback;
                        fallback++;
                        if (!localUsed.has(forced) && !globalUsed.has(forced)) {
                            record.fullName = forced;
                            localUsed.add(forced);
                            globalUsed.add(forced);
                            result.push(record);
                            stats[country]++;
                        }
                    }
                });

                generatedRecords = result;
                renderResult(result, stats, { style: style, structure: structure, gender: gender, includeUnisex: includeUnisex, extras: extras });
            }

            function renderResult(records, stats, context) {
                const empty = document.getElementById('emptyState');
                const summaryEl = document.getElementById('summary');
                const statsEl = document.getElementById('stats');
                const cardsEl = document.getElementById('resultsCards');
                const listEl = document.getElementById('resultsList');
                const toolsEl = document.getElementById('resultTools');

                empty.classList.add('none');
                cardsEl.innerHTML = '';
                listEl.innerHTML = '';

                const structTextMap = {
                    firstOnly: 'first name only',
                    firstOne: 'first + 1 surname',
                    firstTwo: 'first + 2 surnames',
                    firstFour: 'first + 4 surnames'
                };

                let summary = records.length + ' realistic names were generated using ' + structTextMap[context.structure] + ' structure';
                summary += ', style ' + context.style + ', gender ' + context.gender;
                if (context.includeUnisex) {
                    summary += ', with ambiguous names enabled';
                }
                summary += '.';

                summaryEl.classList.remove('none');
                summaryEl.textContent = summary;

                const statsLines = [];
                Object.keys(stats).forEach((country) => {
                    statsLines.push(country + ': ' + stats[country] + ' names');
                });
                statsEl.classList.remove('none');
                statsEl.innerHTML = '<strong>Breakdown:</strong><br>' + statsLines.join('<br>');

                if (records.length <= 20) {
                    listEl.classList.add('none');
                    records.forEach((record) => {
                        const mainText = buildMainDisplayText(record, context.extras);
                        const extrasText = buildExtrasOnlyText(record, context.extras);
                        const card = document.createElement('div');
                        card.className = 'name-card';
                        card.innerHTML = '<div class="main">' + mainText + '</div>';
                        if (extrasText !== '') {
                            card.innerHTML += '<div class="meta">' + extrasText + '</div>';
                        }
                        cardsEl.appendChild(card);
                    });
                } else {
                    listEl.classList.remove('none');
                    records.forEach((record) => {
                        const li = document.createElement('li');
                        li.textContent = buildRecordViewText(record, context.extras);
                        listEl.appendChild(li);
                    });
                }

                const plainLines = [summary, '', 'Breakdown:'].concat(statsLines).concat(['']);
                records.forEach((record, index) => {
                    plainLines.push((index + 1) + '. ' + buildRecordViewText(record, context.extras));
                });
                document.getElementById('plainOutput').textContent = plainLines.join('\n');

                toolsEl.classList.remove('none');
            }

            function clearResults() {
                generatedRecords = [];
                document.getElementById('summary').classList.add('none');
                document.getElementById('summary').textContent = '';
                document.getElementById('stats').classList.add('none');
                document.getElementById('stats').innerHTML = '';
                document.getElementById('resultsCards').innerHTML = '';
                document.getElementById('resultsList').innerHTML = '';
                document.getElementById('resultsList').classList.add('none');
                document.getElementById('plainOutput').textContent = '';
                document.getElementById('resultTools').classList.add('none');
                document.getElementById('emptyState').classList.remove('none');
            }

            function selectedExportFields() {
                const extras = getSelectedExtras();
                const base = ['fullName', 'style'];
                if (extras.includes('country')) {
                    base.push('country');
                }
                if (extras.includes('sex')) {
                    base.push('outputSex');
                }
                if (extras.includes('age')) {
                    base.push('age');
                }
                if (extras.includes('nationality')) {
                    base.push('nationality');
                }
                if (extras.includes('locality')) {
                    base.push('locality');
                }
                if (extras.includes('language')) {
                    base.push('language');
                }
                if (extras.includes('popularity')) {
                    base.push('outputPopularity');
                }
                return base;
            }

            function downloadText(filename, text, mimeType) {
                const blob = new Blob([text], { type: mimeType });
                const url = URL.createObjectURL(blob);
                const a = document.createElement('a');
                a.href = url;
                a.download = filename;
                document.body.appendChild(a);
                a.click();
                a.remove();
                URL.revokeObjectURL(url);
            }

            function downloadTxt() {
                if (!generatedRecords.length) {
                    return;
                }
                downloadText('random-names.txt', document.getElementById('plainOutput').textContent, 'text/plain;charset=utf-8');
            }

            function downloadJson() {
                if (!generatedRecords.length) {
                    return;
                }
                const fields = selectedExportFields();
                const output = generatedRecords.map((record) => {
                    const obj = {};
                    fields.forEach((field) => {
                        obj[field] = record[field] !== undefined ? record[field] : '';
                    });
                    return obj;
                });
                downloadText('random-names.json', JSON.stringify(output, null, 2), 'application/json;charset=utf-8');
            }

            function csvEscape(value) {
                const s = String(value === undefined ? '' : value);
                if (s.includes('"') || s.includes(',') || s.includes('\n')) {
                    return '"' + s.replace(/"/g, '""') + '"';
                }
                return s;
            }

            function downloadCsv() {
                if (!generatedRecords.length) {
                    return;
                }
                const fields = selectedExportFields();
                const rows = [fields.join(',')];
                generatedRecords.forEach((record) => {
                    rows.push(fields.map((f) => csvEscape(record[f])).join(','));
                });
                downloadText('random-names.csv', rows.join('\n'), 'text/csv;charset=utf-8');
            }

            function downloadHtmlList(type) {
                if (!generatedRecords.length) {
                    return;
                }
                const extras = getSelectedExtras();
                const tag = type === 'ol' ? 'ol' : 'ul';
                const lines = [];
                lines.push('<!DOCTYPE html>');
                lines.push('<html lang="en">');
                lines.push('<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Random Names List</title></head>');
                lines.push('<body>');
                lines.push('<h1>Random Names Export</h1>');
                lines.push('<' + tag + '>');
                generatedRecords.forEach((record) => {
                    lines.push('<li>' + buildRecordViewText(record, extras).replace(/</g, '&lt;').replace(/>/g, '&gt;') + '</li>');
                });
                lines.push('</' + tag + '>');
                lines.push('</body>');
                lines.push('</html>');

                const filename = type === 'ol' ? 'random-names-ordered-list.html' : 'random-names-unordered-list.html';
                downloadText(filename, lines.join('\n'), 'text/html;charset=utf-8');
            }

            function init() {
                createCountryPills();
                syncCountryCount();
                applyPreset('western');
                sanitizeQuantity();
            }

            init();
        </script></p>
<p>The post <a href="https://imediacto.com/tools/name-generators/random-name-generator/">Random Name Generator</a> appeared first on <a href="https://imediacto.com">Free Online Tools - Imediacto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://imediacto.com/tools/name-generators/random-name-generator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
