How does it work?
This tool sorts lines of text based on hexadecimal values found in each line. It identifies common hex formats (like 0x123, #ABC, or 42h) and sorts the lines numerically according to these values.
The sorting follows these rules:
- Each line is treated as a separate item to sort
- The first hexadecimal value found in each line is used for sorting
- Lines are sorted in ascending numerical order based on their hex values
- Lines without hex values can be placed at the end or mixed with others (based on your preference)
- Hex values are recognized in formats like 0x123, #ABC, 42h, or plain DEADBEEF
Example
Original text
0xFF - Maximum 8-bit value
#A0B0C0 - A web color
Memory address: 0x1A3F
42h - Old-style hex notation
Plain text without hex
Another line: 0x10
DEADBEEF - Common test pattern
0x0 - Zero in hexAfter sorting by hex values
0x0 - Zero in hex
Plain text without hex
Another line: 0x10
Memory address: 0x1A3F
42h - Old-style hex notation
0xFF - Maximum 8-bit value
#A0B0C0 - A web color
DEADBEEF - Common test patternThis tool is useful for:
- Organizing memory addresses or hex dumps
- Sorting color codes in web development
- Arranging hardware register values
- Organizing data from debugging sessions
- Sorting hexadecimal identifiers or checksums
Parameters
- Text to sort: The input text containing lines with hexadecimal values
- Sorting preference: Choose whether to show lines with hex values first or mixed with other lines
- Hex formats supported: 0x123, #ABC, 42h, or plain hex digits like DEADBEEF
Recognized hex formats:
0x123- Common programming prefix#ABC- Web color format42h- Assembly/old-style suffixDEADBEEF- Plain hex digits
Note: If a line contains multiple hex values, only the first one is used for sorting. Case is ignored when comparing hex values (A-F vs a-f).
Related Tools
- Sort Case-Sensitive A-z - Sort text in case-sensitive alphabetical order
- Sort Case-Sensitive Z-a - Sort text in reverse case-sensitive order
- Encode to Hex - Convert text to hexadecimal representation
- Decode from Hex - Convert hexadecimal back to text
All Tools
See all available tools