How to Sort Word Text Alphabetically Without Losing Hyperlinks
Question details
The user needs to sort a list of linked text alphabetically in a Word document without breaking or removing the embedded hyperlinks.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Reorganizing text lists or table rows alphabetically where the text contains clickable hyperlinks.
- Observed behavior
- The goal is to achieve an alphabetically sorted list or table where all hyperlink associations accurately follow their respective display text without breaking.
Ensure your text items are formatted consistently as separate paragraphs or are placed neatly within individual table rows before attempting to sort.
Sort the Linked Text as Paragraphs
This is the primary method to alphabetically sort lists containing hyperlinks by treating each line item as a separate paragraph.
By default, word processors use paragraph marks to determine how to separate items during a sort. Selecting the entire block of text ensures the hyperlinks remain attached to their respective display phrases.
Highlight the complete list of text you want to sort, making sure to include the hyperlink text in your selection.
Navigate to the 'Home' tab on the top ribbon and click the 'Sort' icon (usually depicted by the letters A and Z with a downward arrow).
In the Sort Text dialog box, set the 'Sort by' dropdown menu to 'Paragraphs'.
Choose 'Text' as the type, select the 'Ascending' radio button to sort alphabetically from A to Z, and click 'OK' to confirm.

Convert to a Table and Sort by Column
If standard paragraph sorting breaks your hyperlinks or jumbles the formatting, placing the items into a table provides a more rigid structure for sorting.
Sort Text with Hyperlinks Flawlessly in WPS Writer
WPS Writer allows you to organize and sort your lists and tables alphabetically without corrupting your inserted hyperlinks. It features a highly intuitive interface for all your text formatting needs and seamlessly handles standard Word documents.
- 1. Open your document: Launch WPS Office and open the document containing the linked text you want to sort.
- 2. Highlight the text: Select the list of paragraphs or the table column that contains your hyperlinks.
- 3. Access the Sort tool: Navigate to the 'Home' tab and click on the 'Sort' icon located in the Paragraph section.
- 4. Confirm sorting parameters: Select 'Paragraphs' or the relevant table column, choose 'Ascending', and click 'OK' to sort without losing links.

Frequently Asked Questions
Why do my hyperlinks disappear when sorting text?
Hyperlinks may disappear if the selected text includes mixed formatting, hidden characters, or if the hyperlinks span across multiple unrecognized line breaks. Using the table method (converting the text to a table first) forces the word processor to treat each cell as a single block, preventing the loss of links.
Can I sort my text based on the hyperlink URL instead of the display text?
By default, sorting is based on the visible display text. To sort by the actual URL, you must first expose the field codes (pressing Alt+F9 in Microsoft Word), which reveals the hidden URL text. Perform your sort on these exposed fields, and then press Alt+F9 again to hide the codes.
How do I sort a table without mixing up the data in other columns?
When sorting a table, ensure you select the entire table (all columns and rows) before clicking Sort. In the Sort dialog box, choose the specific column you want to sort by in the 'Sort by' dropdown. This ensures the rows stay together as a single unit while organizing by your chosen column.




