diff --git a/ippisite/ippidb/templates/compound_list.html b/ippisite/ippidb/templates/compound_list.html
index 8d6a65a5c4a4d52de039aa323e07eb585edfa82d..0487ab616001e8d48a212130b494157d42410fad 100644
--- a/ippisite/ippidb/templates/compound_list.html
+++ b/ippisite/ippidb/templates/compound_list.html
@@ -67,6 +67,16 @@
                 {% endif %}
             {% endif %}
         </span>
+        <div class="dropdown">
+            <button class="btn btn-secondary dropdown-toggle" type="button" id="sortMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+                <i class="fas fa-sort-amount-down" title="sort by"></i>
+            </button>
+            <div class="dropdown-menu" aria-labelledby="sortMenuButto">
+                {% for sort_by_option, verbose_name in sort_by_options.items %}
+                        <a class="dropdown-item {% if sort_by_option == sort_by %}active{% endif %}" href="#" onclick="modifyUrl('sort_by','{{ sort_by_option }}')">{{ verbose_name }}</a>
+                {% endfor %}
+            </div>
+        </div>
         <span class="btn-group col-md-2">
             <a class="btn btn-default btn-outline-primary {% if display == 'v' %}active{% endif %}" href="#" {% if display != 'v' %}onclick="modifyUrl('display', 'v')"{% endif %}>
                 <i class="fa fa-th" title="Vignettes"></i>
diff --git a/ippisite/ippidb/views.py b/ippisite/ippidb/views.py
index f6dea702dd87b4f81e29e367ae707d88e29f5b8c..958d2b8695e854f5f0382392cb20e5b02a4f3185 100644
--- a/ippisite/ippidb/views.py
+++ b/ippisite/ippidb/views.py
@@ -198,6 +198,9 @@ def compound_list(request):
     boundcomplexes = ProteinDomainBoundComplex.objects.exclude(id__in=request.GET.getlist('boundcomplex'))
     if boundcomplexes_all is None:
         boundcomplexes = boundcomplexes[:5]
+    sort_by_options = ['id', 'molecular_weight', 'a_log_p', 'nb_aromatic_sssr', 'nb_chiral_centers']
+    sort_by = request.GET.get('sort_by', 'id')
+    compounds = compounds.order_by(sort_by)
     compounds = compounds.distinct()
     count = compounds.count()
     # handle pagination in compounds list
@@ -215,6 +218,7 @@ def compound_list(request):
     if display not in ['l', 't']:
         display = 'v'
     compound_fields = {f.name: f.verbose_name for f in Compound._meta.get_fields() if not(f.is_relation)}
+    sort_by_options = {sort_by_option: compound_fields[sort_by_option] for sort_by_option in sort_by_options}
     fields = request.GET.get('fields',['id', 'common_name', 'molecular_weight', 'a_log_p', 'compound_action_pdb_ids', 'biblio_refs'])    
     return render(request, 'compound_list.html', {'compounds': compounds,
                                                   'count': count,
@@ -232,7 +236,9 @@ def compound_list(request):
                                                   'boundcomplexes_all': boundcomplexes_all,
                                                   'display': display,
                                                   'compound_fields': compound_fields,
-                                                  'fields': fields
+                                                  'fields': fields,
+                                                  'sort_by': sort_by,
+                                                  'sort_by_options': sort_by_options
                                                 })
 
 def compound_card(request, compound_id):