Home › Text Tools › Sort Names by Last Name

Sort Names by Last Name

Paste a list of full names and get it back in alphabetical order by surname. Titles, suffixes like Jr. and III, and surname particles such as van, de and da are recognized, and you can switch the output to “Last, First”.

Last updated:

Order

Commas are kept for the “Last, First” format.

On: van Gogh is filed under G. Off: under V.

Enter your values to see the result.
Advertisement
Advertisement

How to use the Sort Names by Last Name

  1. Paste your names, one per line (full names, or already in “Last, First” form).
  2. Pick the order and the output format, for example Last, First for a roster.
  3. Decide how to file particles: keep van Gogh under V or move it to G.
  4. Check the table to see how each name was split into first name, last name and suffix.
  5. Copy or download the sorted list, or download the table as CSV.

How names are split

InputLast nameFirst / middleSuffixLast, First output
Martin Luther King Jr.KingMartin LutherJr.King, Martin Luther, Jr.
Ludwig van Beethovenvan BeethovenLudwigvan Beethoven, Ludwig
Dr. Maya AngelouAngelouDr. MayaAngelou, Dr. Maya
Mary de la Cruzde la CruzMaryde la Cruz, Mary
García Márquez, GabrielGarcía MárquezGabrielGarcía Márquez, Gabriel
CherCherCher

Alphabetizing rules worth knowing

  • Letter by letter vs word by word: this tool compares whole surnames, so “De Luca” and “Deluca” sit next to each other, with spaces counted before letters.
  • Mc and Mac are sorted exactly as spelled (MacArthur before McAdams), which is what most modern style guides recommend for lists.
  • Hyphenated surnames like Anderson-Clark are treated as one surname and sorted by the first part.
  • Names from cultures that put the family name first (for example many Chinese, Korean, Japanese and Hungarian names) should be entered as “Family, Given” so the right part is used.
  • Same surname: sort by first name, then by suffix, so Sammy Davis Sr. comes before Sammy Davis Jr.

Frequently asked questions

How does the tool find the last name?

If a line contains a comma, the part before the comma is the last name (Smith, John). Otherwise the last word is the surname, together with any surname particles right before it (van, von, de, da, del, la, ten and similar). Titles at the start and suffixes such as Jr., Sr., III and PhD are set aside so they do not change the order.

Where should “van Gogh” or “de la Cruz” go in an alphabetical list?

Conventions differ. Many English-language indexes keep lowercase particles with the surname and file van Gogh under V, while Dutch and some library styles file it under G. Use the Ignore particles option to choose. Whatever you choose, apply it consistently through the whole list.

Can it handle names with Jr., Sr. or Roman numerals?

Yes. Suffixes are recognized with or without a comma (John Smith Jr. or John Smith, Jr.) and are kept with the name. When two people share the same name, Sr. sorts before Jr., then II, III and IV.

How do I switch names to “Last, First” format?

Choose Last, First Middle as the output format. John Ronald Smith Jr. becomes Smith, John Ronald, Jr., which is the usual form for rosters, bibliographies and mailing lists.

What about two-word surnames without a particle, like García Márquez?

Without a comma the tool cannot know that a surname has two words, so García Márquez would be sorted under Márquez. Write such names as “García Márquez, Gabriel” and the whole surname before the comma is used.

Does it ignore accents and capitalization?

Yes. Sorting uses locale-aware comparison that treats É like E and a like A, and numbers inside names are compared numerically.

Is my list uploaded anywhere?

No. Sorting happens entirely in your browser, so names never leave your device.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Sort Lines AlphabeticallySort a list A-Z, Z-A, numerically, naturally or by length, or shuffle it.Initials GeneratorTurn names into initials (JFK, J.F.K., J. F. K.) or monogram order, one name or a whole list.Remove Duplicate LinesDelete duplicate lines from any list, ignoring case or spaces, keep first or last, and sort.Sort Words AlphabeticallyPut the words in any text in A-Z or Z-A order, remove duplicates and pick a separator.Essay Length & Reading TimeWords to reading time, speaking time and handwritten or typed pages.Speech Length CalculatorPaste a speech to see how long it takes to say at any speaking speed.Text to SpeechTurn text into natural-sounding speech.AI Prompt GeneratorBuild better prompts for ChatGPT, Midjourney and more.Email Signature GeneratorBuild HTML email signatures for Gmail and Outlook.Flashcard MakerMake flashcard decks and study them with flip cards and spaced repetition, saved in your browser.Quiz MakerMake a multiple-choice quiz, take it with instant scoring and share it with a link.Title Capitalization ToolCapitalize titles and headlines in AP, APA, Chicago and MLA style side by side, with one-click copy.Headline AnalyzerScore your headline 0–100 on length, word balance, power words, sentiment and type, with tips.Speech to TextDictate with your voice and get editable text in 50+ languages, with voice punctuation.Cover Letter GeneratorFill in a short form and get a tailored, editable cover letter to copy, download or save as PDF.Rhyme FinderFind perfect and near rhymes for any word, grouped by syllables, for songs and poems.Acronym GeneratorTurn a phrase into an acronym, or turn letters into creative backronym ideas.Acrostic Poem GeneratorTurn any name or word into an acrostic poem by theme, edit the lines and save it as an image.Apology Letter GeneratorWrite a sincere apology letter, email and text for a customer, friend, boss or teacher.Authorization Letter GeneratorCreate an authorization letter to let someone collect documents, act for you or pick up a child.Book Title GeneratorGenerate book title ideas for fantasy, romance, mystery, sci-fi or nonfiction books.Random Character GeneratorGenerate story characters with name, looks, traits, flaw, motivation and backstory hook; lock any field.Compliment GeneratorGet kind, funny or professional compliments for friends, coworkers, partners or family, with their name.Domain Name GeneratorTurn keywords into brandable domain name ideas with prefixes, suffixes, blends and scores.Email Subject Line GeneratorGet 20 email subject lines for newsletters, sales or cold emails, with length and spam-word checks.Essay Outline GeneratorBuild a structured essay outline with hook, topic sentences, evidence and conclusion, plus word budgets.Excuse GeneratorFunny excuses for being late, missing homework or skipping chores, from believable to absurd.Hashtag and Mention ExtractorPull every #hashtag and @mention from text with counts, dedupe and frequency sorting.Haiku GeneratorGenerate 5-7-5 haiku by theme, or check your own haiku's syllables line by line.Hashtag GeneratorGenerate 30 relevant hashtags from keywords, mix broad and niche tags, select and copy.Job Description GeneratorBuild a structured job posting in Markdown, HTML or plain text with role-based bullet ideas.Leave Application GeneratorWrite a leave letter or email for office or school, with leave days counted for you.Letter of Intent GeneratorCreate a formatted letter of intent for a job, graduate school, business deal or lease.LinkedIn Headline Generator15 headline formulas from your role, skills and value, with a 220-character counter.Love Letter GeneratorWrite a heartfelt, sweet, romantic or funny love letter from your names, memories and details.Nickname GeneratorGet cute, cool, funny or gaming nicknames for any name, with classic short forms.Poem GeneratorCreate rhyming poems, free verse, limericks and love poems by topic and length; copy or download.Product Description GeneratorTurn product features into e-commerce descriptions, bullet lists and an SEO meta description.Mnemonic GeneratorTurn a list of terms into a memorable first-letter sentence, acrostic or acronym.Invitation Wording GeneratorTurn your event details into polished invitation wording for birthdays, showers, weddings and more.Playlist Name GeneratorAesthetic, funny and simple playlist names by mood, genre and occasion, with emoji.Podcast Episode Title GeneratorEpisode title ideas from your topic and guest, using proven formulas and your numbering style.Podcast Interview Questions GeneratorBuild a podcast interview plan by guest type and topic, from icebreakers to deep-dive questions.Price Increase Letter GeneratorWrite a customer price increase notice with effective date, reason, new prices and tone.Salary Negotiation Email GeneratorWrite a polite counter-offer email from your offer, target salary and reasons, in your tone.Termination Letter GeneratorWrite an employee termination letter with reason, final day, final pay, benefits and property return.Employee Warning Letter GeneratorWrite a written warning for attendance, performance or conduct with facts and an improvement plan.Wedding Invitation Wording GeneratorGet formal, semi-formal or casual wedding invitation wording for any host, with reception and RSVP lines.Wedding Photo Shot List GeneratorBuild a printable wedding photo shot list with family groups and must-have moments by timeline.WiFi Name GeneratorFunny, clever and punny WiFi names plus a custom pun builder with a 32-byte SSID check.Free Fire Name Style Generator50+ stylish Unicode name styles for Free Fire nicknames with a 12-character limit check.Online OutlinerBullet outliner with collapse, drag reorder, Tab indent and Markdown, OPML or TXT export.Random Topic GeneratorRandom essay, speech, debate, conversation and writing topics by category and difficulty.Resume Summary GeneratorWrite resume summaries and objective statements in short, standard and detailed lengths.Slogan GeneratorGenerate 50 slogans and taglines for your brand by industry and tone; save favorites and copy.Online Speed ReaderRead faster: flash text one word at a time at 100 to 1000 WPM with focus-letter highlighting.Sympathy Message GeneratorWrite respectful condolence card and text messages by relationship, loss and tone.Thesis Statement GeneratorTurn your topic, position and three reasons into several clear thesis statement options.Wedding Speech GeneratorWrite a structured wedding toast for best man, maid of honor or parent from your names and stories.Word ScramblerScramble letters or word order in text, or make a printable word scramble worksheet with answers.YouTube Channel Name GeneratorGenerate YouTube channel names from your niche and name, with handle-ready @versions.YouTube Title GeneratorGet 20 YouTube title ideas for your topic with length checks and power-word highlights.Ad Copy GeneratorWrite ad headlines and descriptions with AIDA, PAS and FAB formulas and live character counts.Interview Thank You Email GeneratorWrite short, medium and formal thank-you emails after a job interview, with subject lines.Job Application Email GeneratorWrite a job application email body and subject line with your highlights and attachments.Job Offer Letter GeneratorWrite a formal employment offer letter with salary, benefits and contingencies, as Word or PDF.Press Release GeneratorWrite an AP-style press release with headline, dateline, quotes, boilerplate and ### ending.Wedding Hashtag GeneratorTurn your names, date and city into dozens of creative, punny wedding hashtags to shortlist.
See all 103 Writing & Idea Generators →